Focus item tree on Escape in empty Quick Search textbox
This commit is contained in:
parent
0d37d2752c
commit
64b8068504
1 changed files with 7 additions and 2 deletions
|
@ -2740,8 +2740,13 @@ var ZoteroPane = new function()
|
|||
*/
|
||||
this.handleSearchKeypress = function (textbox, event) {
|
||||
if (event.keyCode == event.DOM_VK_ESCAPE) {
|
||||
textbox.searchTextbox.value = '';
|
||||
this.search();
|
||||
if (textbox.searchTextbox.value) {
|
||||
textbox.searchTextbox.value = '';
|
||||
this.search();
|
||||
}
|
||||
else {
|
||||
this.itemsView.focus();
|
||||
}
|
||||
}
|
||||
else if (event.keyCode == event.DOM_VK_RETURN) {
|
||||
this.search(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue