зеркало из https://github.com/mozilla/gecko-dev.git
Bug 337386: search suggestion autocomplete latency/delay can make search slow to respond or seem broken, patch by mconnor, r=ben
This commit is contained in:
Родитель
db77a93ee5
Коммит
583bdf9236
|
@ -730,6 +730,19 @@
|
|||
action="return this.openSearch();"/>
|
||||
#endif
|
||||
|
||||
<handler event="keypress" keycode="VK_ENTER"><![CDATA[
|
||||
// this is a bit of a hack to ensure that even if a search is ongoing
|
||||
// we will still search immediately
|
||||
const contractID =
|
||||
"@mozilla.org/autocomplete/search;1?name=search-autocomplete";
|
||||
const nsIACSearch = Components.interfaces.nsIAutoCompleteSearch
|
||||
var searchService = Components.classes[contractID]
|
||||
.getService(nsIACSearch);
|
||||
searchService.stopSearch();
|
||||
this.mEnterEvent = null;
|
||||
this.onTextEntered(event);
|
||||
]]></handler>
|
||||
|
||||
<handler event="dragdrop" phase="capturing">
|
||||
nsDragAndDrop.drop(event, this.searchbarDNDObserver);
|
||||
</handler>
|
||||
|
|
Загрузка…
Ссылка в новой задаче