Bug 599793 - Paste & Go / Search should replace entire contents of textbox; r=dao a=blocking2.0-final+

This commit is contained in:
Frank Yan 2010-10-26 15:35:44 -07:00
parent 5f6ea81f7c
commit ef24a45fb3
2 changed files with 4 additions and 2 deletions

View File

@ -160,7 +160,8 @@
GetStringFromName("pasteAndGo.label");
pasteAndGo.setAttribute("label", label);
pasteAndGo.setAttribute("anonid", "paste-and-go");
pasteAndGo.setAttribute("oncommand", "goDoCommand('cmd_paste'); gURLBar.handleCommand();");
pasteAndGo.setAttribute("oncommand",
"gURLBar.value = ''; goDoCommand('cmd_paste'); gURLBar.handleCommand();");
cxmenu.insertBefore(pasteAndGo, insertLocation.nextSibling);
}
]]></constructor>

View File

@ -604,7 +604,8 @@
label = this._stringBundle.getString("cmd_pasteAndSearch");
element.setAttribute("label", label);
element.setAttribute("anonid", "paste-and-search");
element.setAttribute("oncommand", "goDoCommand('cmd_paste'); document.getElementById('searchbar').handleSearchCommand();");
element.setAttribute("oncommand",
"BrowserSearch.searchBar.value = ''; goDoCommand('cmd_paste'); BrowserSearch.searchBar.handleSearchCommand();");
cxmenu.insertBefore(element, insertLocation.nextSibling);
pasteAndSearch = element;
}