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:
gavin%gavinsharp.com 2006-07-05 21:09:49 +00:00
Родитель db77a93ee5
Коммит 583bdf9236
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -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>