From 798d0d72425d4296918bcac0975901c5f565196f Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Tue, 26 Dec 2023 00:55:30 +0000 Subject: [PATCH] front: ignore shift+key combinations if url bar is focused prevents shortcuts from getting triggered by accident when manually typing out url --- src/front/cobalt.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/front/cobalt.js b/src/front/cobalt.js index b3d3b7a8..31196215 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -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');