Bug 415255: AMO Manager: Clearing search results should refocus cursor in

search textbox. r=robstrong, a=beltzner


git-svn-id: svn://10.0.0.236/trunk@247301 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dtownsend%oxymoronical.com 2008-03-07 11:06:42 +00:00
parent 30cbf87bbb
commit fdf6ee8a1a
2 changed files with 7 additions and 0 deletions

View File

@ -642,6 +642,7 @@ function displaySearchThrobber(aKey) {
function resetSearch() {
var searchbox = document.getElementById("searchbox");
searchbox.value = "";
searchbox.focus();
retrieveRepositoryAddons("");
}

View File

@ -921,6 +921,7 @@
this.setAttribute("value", "");
this._cancelButton.hidden = true;
this._searchButton.hidden = false;
this.focus();
</body>
</method>
@ -936,6 +937,11 @@
</implementation>
<handlers>
<handler event="focus" phase="capturing">
if (event.originalTarget == this)
this.textbox.focus(); // Forward focus to actual textbox
</handler>
<handler event="keypress" keycode="VK_ENTER">
if (event.originalTarget == this.textbox.inputField) {
this.startSearch();