mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1119450: Clicks on the search go button shouldn't open the search popup. r=felipe
--HG-- extra : rebase_source : 0f7fa4e6e6cc833a41cac28288bdce38722815a7
This commit is contained in:
parent
8714e66bdc
commit
6022ced1e2
@ -751,6 +751,11 @@
|
||||
|
||||
<handler event="click" button="0">
|
||||
<![CDATA[
|
||||
// Ignore clicks on the search go button.
|
||||
if (event.originalTarget.getAttribute("anonid") == "search-go-button") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Open the suggestions whenever clicking on the search icon or if there
|
||||
// is text in the textbox.
|
||||
if (event.originalTarget.getAttribute("anonid") == "searchbar-search-button" ||
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
const searchbar = document.getElementById("searchbar");
|
||||
const searchIcon = document.getAnonymousElementByAttribute(searchbar, "anonid", "searchbar-search-button");
|
||||
const goButton = document.getAnonymousElementByAttribute(searchbar, "anonid", "search-go-button");
|
||||
const textbox = searchbar._textbox;
|
||||
const searchPopup = document.getElementById("PopupSearchAutoComplete");
|
||||
|
||||
@ -318,3 +319,19 @@ add_task(function* refocus_window_doesnt_open_popup_keyboard() {
|
||||
searchPopup.removeEventListener("popupshowing", listener, false);
|
||||
textbox.value = "";
|
||||
});
|
||||
|
||||
// Clicking the search go button shouldn't open the popup
|
||||
add_no_popup_task(function* search_go_doesnt_open_popup() {
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
|
||||
gURLBar.focus();
|
||||
textbox.value = "foo";
|
||||
searchbar.inputChanged();
|
||||
|
||||
let promise = promiseOnLoad();
|
||||
EventUtils.synthesizeMouseAtCenter(goButton, {});
|
||||
yield promise;
|
||||
|
||||
textbox.value = "";
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user