Browse Source

bail from click handler when alt key is pressed

master
Conduitry 1 month ago
parent
commit
b442fa132d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      location.js

+ 1
- 1
location.js View File

@ -32,7 +32,7 @@ const goto = (url, replace) => {
};
click_handler = event => {
if (event.button === 0 && !event.ctrlKey && !event.metaKey && !event.shiftKey && !event.defaultPrevented) {
if (event.button === 0 && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey && !event.defaultPrevented) {
const elm = event.target.closest('a');
if (elm && elm.href && !elm.target && !elm.hasAttribute('download')) {
const url = elm.href;

Loading…
Cancel
Save