client: open links in new tab
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
If links are clicked while holding Ctrl or clicked with middle mouse button, they will be opened in a new tab. Changelog: Fixed
This commit is contained in:
parent
1472c21cb6
commit
7914fcfef2
1 changed files with 5 additions and 2 deletions
|
@ -65,8 +65,11 @@ function onContextmenu(ev) {
|
|||
}], ev);
|
||||
}
|
||||
|
||||
function nav() {
|
||||
if (props.behavior === 'browser') {
|
||||
function nav(evt: MouseEvent) {
|
||||
if (evt.ctrlKey || evt.buttons === 4) {
|
||||
// held Control or clicked with middle mouse button
|
||||
window.open(props.to, '_blank');
|
||||
} else if (props.behavior === 'browser') {
|
||||
location.href = props.to;
|
||||
} else if (props.behavior === 'window') {
|
||||
os.pageWindow(props.to);
|
||||
|
|
Loading…
Reference in a new issue