mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 00:59:57 +02:00
Refactor ZenKeyboardShortcuts to fix target shortcut identification
This commit is contained in:
parent
b10313ac47
commit
57b68599e9
1 changed files with 3 additions and 4 deletions
|
@ -823,7 +823,7 @@ var gZenKeyboardShortcutsManager = {
|
|||
|
||||
// Unsetting shortcut
|
||||
for (let targetShortcut of this._currentShortcutList) {
|
||||
if (targetShortcut.getAction() != action) {
|
||||
if (targetShortcut.getID() != action) {
|
||||
continue;
|
||||
}
|
||||
if (!shortcut && !modifiers) {
|
||||
|
@ -854,10 +854,9 @@ var gZenKeyboardShortcutsManager = {
|
|||
return rv;
|
||||
},
|
||||
|
||||
checkForConflicts(shortcut, modifiers, id, action) {
|
||||
checkForConflicts(shortcut, modifiers, id) {
|
||||
for (let targetShortcut of this._currentShortcutList) {
|
||||
if ((targetShortcut.getID() == id)
|
||||
|| (action == targetShortcut.getAction())) {
|
||||
if (targetShortcut.getID() == id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue