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) {
|
this.handleSearchKeypress = function (textbox, event) {
|
||||||
if (event.keyCode == event.DOM_VK_ESCAPE) {
|
if (event.keyCode == event.DOM_VK_ESCAPE) {
|
||||||
textbox.searchTextbox.value = '';
|
if (textbox.searchTextbox.value) {
|
||||||
this.search();
|
textbox.searchTextbox.value = '';
|
||||||
|
this.search();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.itemsView.focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (event.keyCode == event.DOM_VK_RETURN) {
|
else if (event.keyCode == event.DOM_VK_RETURN) {
|
||||||
this.search(true);
|
this.search(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue