bail from click handler when alt key is pressed

development
Conduitry 2 years ago
parent 23f98481c7
commit b442fa132d
  1. 2
      location.js

@ -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