1
0
Fork 0

bail from click handler when alt key is pressed

This commit is contained in:
Conduitry 2020-08-09 08:40:43 -04:00
parent 23f98481c7
commit b442fa132d
1 changed files with 1 additions and 1 deletions

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;