From cbab38f324ff24918de4fd7c42e60224f3414d26 Mon Sep 17 00:00:00 2001 From: Erayd Date: Sun, 20 Oct 2019 07:33:35 +1300 Subject: [PATCH] Make Ctrl+C copy username if username button is focused (#183) --- src/popup/interface.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/popup/interface.js b/src/popup/interface.js index 7ab0638..b8c4c6f 100644 --- a/src/popup/interface.js +++ b/src/popup/interface.js @@ -206,7 +206,11 @@ function keyHandler(e) { break; case "KeyC": if (e.ctrlKey) { - this.doAction(e.shiftKey ? "copyUsername" : "copyPassword"); + if (e.shiftKey || document.activeElement.classList.contains("copy-user")) { + this.doAction("copyUsername"); + } else { + this.doAction("copyPassword"); + } } break; case "KeyG":