-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
- Open Bookmarks Commander and select any bookmark (need to have many bookmarks).
- Open new tab (any page).
- Press Ctrl+W.
- New tab closes and Bookmarks Commander is now active, but for some strange reason it changes the current selection to a random bookmark. It doesn't happen when the new tab is closed by clicking on the "x".
This is really odd, since Ctrl + KeyW doesn't seem to be assigned to any command in bookmarks-commander.
I've found the culprit. This keyup event listener in components\directory-view\list-view.js is causing it:
// to prevent conflict with command access
shadow.addEventListener('keyup', e => {
if (e.code.startsWith('Key') || e.code.startsWith('Digit')) {
const d = this.content.querySelector(`.entry[data-selected=true] ~ .entry[data-key="${e.key}"]`);
if (d) {
d.click();
}
else {
const d = this.content.querySelector(`.entry[data-key="${e.key}"]`);
if (d) {
d.click();
}
}
}
else if (
e.code === 'Backspace' &&
e.shiftKey === false && e.altKey === false && e.metaKey === false && e.ctrlKey === false
) {
const d = this.content.querySelector('.entry[data-index="-1"]');
if (d) {
this.dbclick(d);
}
else {
engine.notify('beep');
}
}
});After removing it, the bug is gone and everything still works. What was the "conflict with command access"?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels