fix: always prevent default on a tags

This commit is contained in:
Jonathan Kelley 2022-02-08 00:40:48 -05:00
parent ec2fb84d96
commit fc5dd8f562
1 changed files with 1 additions and 0 deletions

View File

@ -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 });