Skip to content

Commit

Permalink
Search: do search on full and partial text insert via mouse context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
olecom committed Feb 20, 2015
1 parent dd68860 commit a18af71
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions template/app/controller/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,18 @@ Ext.define('Docs.controller.Search', {
clearTimeout(this.searchTimeout);
this.searchTimeout = Ext.Function.defer(function() {
this.search(el.value);
this.searchTimeout = void 0;
}, this.basicSearchDelay, this);
}
},
change: function(tf, newValue, oldValue){
if(newValue && !oldValue){
this.getDropdown().show();
this.search(newValue);
} else if(!this.searchTimeout && this.getDropdown().isVisible()){
this.search(newValue);
}
},
focus: function(el) {
if (el.value && this.getDropdown().store.getCount() > 0) {
this.getDropdown().show();
Expand Down

0 comments on commit a18af71

Please sign in to comment.