Skip to content

Commit 10e3190

Browse files
authored
fix(core): do not use capture on _blank link event handler, closes #2791 (#3349)
1 parent a03b855 commit 10e3190

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.changes/link-stop-propagation.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Allow preventing opening the default browser on a click on an `<a target="_blank">` element via `stopImmediatePropagation()`.

core/tauri/scripts/core.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@
112112
}
113113
target = target.parentElement
114114
}
115-
},
116-
true
115+
}
117116
)
118117
}
119118

@@ -206,8 +205,8 @@
206205
options:
207206
typeof options === 'string'
208207
? {
209-
title: options
210-
}
208+
title: options
209+
}
211210
: options
212211
}
213212
})

0 commit comments

Comments
 (0)