fix: also prevent default on buttons

This commit is contained in:
Jonathan Kelley committed 2022-02-08 00:43:05 -05:00
1 parent fc5dd8f562
commit 4818c44c7c
1 file changed
+5
+5
View File
@@ -217,6 +217,11 @@ export class Interpreter {
} }
} }
} }
// also prevent buttons from submitting
if (target.tagName == "BUTTON") {
event.preventDefault();
}
} }
// walk the tree to find the real element // walk the tree to find the real element
while (realId == null) { while (realId == null) {