front: ignore shift+key combinations if url bar is focused

merge pull request #288 from dumbmoron/input-ignore-kb-shortcuts
This commit is contained in:
wukko 2023-12-26 18:24:57 +06:00 committed by GitHub
commit 1360bf4f08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -626,6 +626,8 @@ document.onkeydown = (e) => {
if (e.metaKey || e.ctrlKey || e.key === "/") eid("url-input-area").focus();
if (e.key === "Escape" || e.key === "Clear") clearInput();
if (e.target === eid("url-input-area")) return;
// top buttons
if (e.key === "D") pasteClipboard();
if (e.key === "K") changeSwitcher('audioMode', 'false');