feed: ignore shift click

the global click callback should ignore shift click which allows
to use native browser behavior (open link in new window).
pull/80/head
OFF0 1 year ago
parent cc7e8015cb
commit 543d327b5c
Signed by: offbyn
GPG Key ID: 94A2F643C51F37FA

@ -278,13 +278,13 @@ const handleButton = (button: HTMLButtonElement) => {
}; };
document.body.addEventListener('click', (event: MouseEvent) => { document.body.addEventListener('click', (event: MouseEvent) => {
// dont intercept command or shift-click
if (event.metaKey || event.shiftKey) {
return;
}
const target = event.target as HTMLElement; const target = event.target as HTMLElement;
const a = target?.closest('a'); const a = target?.closest('a');
if (a) { if (a) {
// dont intercept command-click
if (event.metaKey) {
return;
}
handleLink(a, event); handleLink(a, event);
return; return;
} }

Loading…
Cancel
Save