Skip to content

Commit

Permalink
fix(core): do not use capture on _blank link event handler, closes #2791
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Feb 7, 2022
1 parent a03b855 commit 10e3190
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changes/link-stop-propagation.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Allow preventing opening the default browser on a click on an `<a target="_blank">` element via `stopImmediatePropagation()`.
7 changes: 3 additions & 4 deletions core/tauri/scripts/core.js
Expand Up @@ -112,8 +112,7 @@
}
target = target.parentElement
}
},
true
}
)
}

Expand Down Expand Up @@ -206,8 +205,8 @@
options:
typeof options === 'string'
? {
title: options
}
title: options
}
: options
}
})
Expand Down

0 comments on commit 10e3190

Please sign in to comment.