Make Ctrl+C copy username if username button is focused (#183)

This commit is contained in:
Erayd
2019-10-20 07:33:35 +13:00
committed by Maxim Baz
parent f47ffceaa6
commit cbab38f324

View File

@@ -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":