From 6ba77a91d966a53658dca3f202f52b3ea361e731 Mon Sep 17 00:00:00 2001 From: "pamg.bugs%gmail.com" Date: Fri, 9 Jun 2006 20:32:19 +0000 Subject: [PATCH] Bug 336925: Middle clicking search button should open new tab. r=gavin.sharp, sr=ben@mozilla.org git-svn-id: svn://10.0.0.236/trunk@199633 18797224-902f-48f8-a5cc-f745e15eee43 --- .../components/search/content/search.xml | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/mozilla/browser/components/search/content/search.xml b/mozilla/browser/components/search/content/search.xml index 8c6cc7e9e1b..c126fe0bf5f 100644 --- a/mozilla/browser/components/search/content/search.xml +++ b/mozilla/browser/components/search/content/search.xml @@ -78,9 +78,9 @@ # so causes the context menu to show up for the textbox too, and subsequently crashes # the app on shutdown. See bug 336662. # -# XXX We'd also like to specify the menupopup position as after_end, as well as -# probably adjusting its length to match that of the searchbar so the search -# engine icons line up, but that's prevented by inconsistent behavior of the +# XXX We'd also like to specify the menupopup position as after_end, as well as +# probably adjusting its length to match that of the searchbar so the search +# engine icons line up, but that's prevented by inconsistent behavior of the # popup position within a toolbarbutton. See bug 336868. @@ -431,7 +437,15 @@ if (anonid == "searchbar-engine-image") { this._textbox.focus(); this._textbox.select(); - } + } + /* We can't use checkForMiddleClick() from utilityOverlay.js here + because the button is using a command handler rather than an oncommand + attribute. The middle-click behavior itself (i.e., opening the search + in a new tab) is handled in handleSearchCommand(). + */ + else if (anonid == "button" && event.button == 1) { + this.handleSearchCommand(event); + } ]]>