mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
Merge pull request #5205 from eleanor-clifford/master
Fix simulateClick for <a>s inside <svg>s
This commit is contained in:
commit
f9e3e5585a
|
|
@ -730,7 +730,9 @@ export function simulateClick(
|
|||
let usePopupBlockerWorkaround =
|
||||
(target as HTMLAnchorElement).target === "_blank" ||
|
||||
(target as HTMLAnchorElement).target === "_new"
|
||||
const href = (target as HTMLAnchorElement).href
|
||||
const href = (target instanceof SVGAElement)
|
||||
? target.href.animVal
|
||||
: (target as HTMLAnchorElement).href;
|
||||
if (href?.startsWith("file:")) {
|
||||
// file URLS cannot be opend with browser.tabs.create
|
||||
// see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create#url
|
||||
|
|
|
|||
Loading…
Reference in a new issue