Browse Source

fix: always prevent default on a tags

Jonathan Kelley 3 năm trước cách đây
mục cha
commit
fc5dd8f562
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      packages/interpreter/src/interpreter.js

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

@@ -210,6 +210,7 @@ export class Interpreter {
               // todo call prevent default if it's the right type of event
               if (shouldPreventDefault !== `onclick`) {
                 if (target.tagName == "A") {
+                  event.preventDefault();
                   const href = target.getAttribute("href");
                   if (href !== "" && href !== null && href !== undefined) {
                     window.rpc.call("browser_open", { href });