Disable typing navigation with modifier keys pressed. Closes #2170

This commit is contained in:
Adomas Venčkauskas 2021-08-30 09:38:02 +03:00
parent d723065a3d
commit 2ef5afdd9c
2 changed files with 2 additions and 2 deletions

View file

@ -153,7 +153,7 @@ var CollectionTree = class CollectionTree extends LibraryTree {
else if (event.key == "F2" && !Zotero.isMac && treeRow.isCollection()) {
this.handleActivate(event, [this.selection.focused]);
}
else if (event.key.length == 1) {
else if (event.key.length == 1 && !(event.ctrlKey || event.metaKey || !event.altKey)) {
this.handleTyping(event.key);
}
return true;

View file

@ -931,7 +931,7 @@ var ItemTree = class ItemTree extends LibraryTree {
this.collapseAllRows();
return false;
}
else if (!event.ctrlKey && !event.metaKey && (event.key.length == 1 && (event.key != " " || this.selection.isSelected(this.selection.focused)))) {
else if (!(event.ctrlKey || event.metaKey || !event.altKey) && event.key.length == 1 && (event.key != " " || this._typingString.length > 1)) {
this.handleTyping(event.key);
return false;
}