mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 22:09:59 +02:00
Refactor ZenKeyboardShortcuts to fix case sensitivity issue in setNewBinding method
This commit is contained in:
parent
287f6fa80a
commit
15fbb2030f
1 changed files with 5 additions and 3 deletions
|
@ -469,9 +469,11 @@ class KeyShortcut {
|
|||
}
|
||||
|
||||
setNewBinding(shortcut) {
|
||||
for (let keycode of Object.entries(KEYCODE_MAP)) {
|
||||
if (KEYCODE_MAP[keycode] == shortcut.toUpperCase()) {
|
||||
this.#keycode = shortcut;
|
||||
for (let keycode of Object.keys(KEYCODE_MAP)) {
|
||||
console.log(keycode);
|
||||
if (keycode == shortcut.toUpperCase()) {
|
||||
console.log('Found keycode', shortcut);
|
||||
this.#keycode = KEYCODE_MAP[keycode];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue