wip: update interpreter
This commit is contained in:
1 parent
8f9d15db4a
commit
2c4e7beae8
1 file changed
+7
-2
@@ -263,7 +263,12 @@ export class Interpreter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// walk the tree to find the real element
|
// walk the tree to find the real element
|
||||||
while (realId == null && target.parentElement != null) {
|
while (realId == null) {
|
||||||
|
// we've reached the root we don't want to send an event
|
||||||
|
if (target.parentElement === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
target = target.parentElement;
|
target = target.parentElement;
|
||||||
realId = target.getAttribute(`data-dioxus-id`);
|
realId = target.getAttribute(`data-dioxus-id`);
|
||||||
}
|
}
|
||||||
@@ -326,7 +331,7 @@ export class Interpreter {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function serialize_event(event: Event) {
|
export function serialize_event(event: Event) {
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case "copy":
|
case "copy":
|
||||||
case "cut":
|
case "cut":
|
||||||
|
|||||||
Reference in new issue
Block a user