Explorar o código

fix: also prevent default on buttons

Jonathan Kelley %!s(int64=3) %!d(string=hai) anos
pai
achega
4818c44c7c
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      packages/interpreter/src/interpreter.js

+ 5 - 0
packages/interpreter/src/interpreter.js

@@ -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
             while (realId == null) {