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); + } ]]>