Closed
Bug 336925
Opened 19 years ago
Closed 19 years ago
Middle Click Search Button should open new tab
Categories
(Firefox :: Search, enhancement)
Tracking
()
RESOLVED
FIXED
Firefox 2 beta1
People
(Reporter: melinda.mcbeath, Assigned: pamg.bugs)
References
Details
(Keywords: fixed1.8.1, Whiteboard: [swag: 0d])
Attachments
(1 file, 2 obsolete files)
|
3.84 KB,
patch
|
bugs
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060506 BonEcho/2.0a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060506 BonEcho/2.0a1
The new search button should open a new tab when middle clicked, like other toolbar buttons.
currently it only selects the text when middle click, like left clicking the favicon.
Reproducible: Always
Comment 1•19 years ago
|
||
Most probably, that's how it should work. Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 2•19 years ago
|
||
This could be implemented the same way the main navigation toolbuttons (back forward)
line 1082 of browser.xul has the definition of back button
line 1086 has the attribute - onclick="checkForMiddleClick(this, event);"
this function is defined in utilityOverlay.js on line 207
i don't have a great understanding of xbl. but search.xml doesn't define a oncommand attribute for the search-go-button. So the function above wouldn't work.
requesting blocking firefox 2.0
Flags: blocking-firefox2?
Comment 3•19 years ago
|
||
This would be pretty useful, and trivial enough to implement that we should just do it. (There's a bug somewhere on the Go button not doing this, if someone can find/file that I'll get that on radar too, since we'll be mucking with Go as well)
Assignee: nobody → pamg.bugs
Severity: normal → enhancement
Flags: blocking-firefox2? → blocking-firefox2+
Target Milestone: --- → Firefox 2 beta1
[about:config]
set "browser.search.openintab" to true
you can open search results in a new tab by click Enter/search button.
| Assignee | ||
Comment 6•19 years ago
|
||
(In reply to comment #5)
Yes, or by alt-clicking without setting that option. Adding a middle-click still seems worthwhile, though.
| Reporter | ||
Comment 7•19 years ago
|
||
(In reply to comment #5)
> [about:config]
> set "browser.search.openintab" to true
>
> you can open search results in a new tab by click Enter/search button.
>
this bug is about consistency in the ui of firefox, not whether there is a setting to change the behavior.
control-click
- the back button
- the home button
- an item on your personal toolbar
what happens?
now control-click the search button. What happens?
alt-click
- the back button
- the home button
- an item on your personal toolbar
what happens?
now alt-click the search button. What happens?
middle-click
- the back button
- the home button
- an item on your personal toolbar
what happens?
now middle-click on the search button. What happens?
I feel like I'm watching sesame street, which one of these doesn't belong?
| Assignee | ||
Comment 8•19 years ago
|
||
(In reply to comment #3)
>(There's a bug somewhere on the Go button not doing this, if
> someone can find/file that I'll get that on radar too, since we'll be mucking
> with Go as well)
Bug 279687
| Assignee | ||
Comment 9•19 years ago
|
||
In addition, the browser.search.openintab pref still makes searches default to opening in a new tab, and alt-clicking still reverses the sense of that pref for a particular click. But all of that is overridden for a middle-click.
Attachment #222066 -
Flags: ui-review?(mconnor)
Attachment #222066 -
Flags: review?(gavin.sharp)
| Assignee | ||
Updated•19 years ago
|
Attachment #222066 -
Flags: ui-review?(mconnor) → superreview?(mconnor)
Comment 10•19 years ago
|
||
Comment on attachment 222066 [details] [diff] [review]
Middle-clicking Search opens results in new tab
>Index: components/search/content/search.xml
>- var newTab = textBox._prefBranch.getBoolPref("browser.search.openintab");
>- this.doSearch(textValue, ((aEvent && aEvent.altKey) ^ newTab));
>+ // Always open in a new tab on a middle-click; otherwise examine the
>+ // preference and the alt key.
>+ var newTab = (aEvent && (aEvent.button == 1));
>+ if (! newTab) {
>+ var newTabPref = textBox._prefBranch.getBoolPref("browser.search.openintab");
>+ newTab = ((aEvent && aEvent.altKey) ^ newTabPref);
>+ }
I think we should remove the aEvent null checks. I added it in bug 306358 because extensions were calling onTextEntered without an event param, but I don't think it's a good idea to continue supporting that, especially since the method has been renamed and is "private". People who want to piggy back on the search bar code like that can just call searchBar.doSearch(searchBar.value, useNewTab). nit: no space after "!".
| Assignee | ||
Comment 11•19 years ago
|
||
(In reply to comment #10)
> I think we should remove the aEvent null checks.
> nit: no space after "!".
Done.
Attachment #222066 -
Attachment is obsolete: true
Attachment #222504 -
Flags: review?(gavin.sharp)
Attachment #222066 -
Flags: superreview?(mconnor)
Attachment #222066 -
Flags: review?(gavin.sharp)
Comment 12•19 years ago
|
||
Comment on attachment 222504 [details] [diff] [review]
Patch addressing Gavin's comments
r=me, but please do get review from a browser peer.
Attachment #222504 -
Flags: review?(gavin.sharp) → review+
| Assignee | ||
Updated•19 years ago
|
Attachment #222504 -
Flags: superreview?(mconnor)
| Assignee | ||
Updated•19 years ago
|
Attachment #222504 -
Flags: superreview?(mconnor) → superreview?(bryner)
| Assignee | ||
Updated•19 years ago
|
Whiteboard: [swag: 0d]
| Assignee | ||
Comment 13•19 years ago
|
||
Attachment #222504 -
Attachment is obsolete: true
Attachment #223863 -
Flags: superreview?(bryner)
Attachment #222504 -
Flags: superreview?(bryner)
Comment 14•19 years ago
|
||
Attachment #223863 -
Flags: superreview?(bryner) → superreview+
| Assignee | ||
Comment 15•19 years ago
|
||
Checked in on trunk and 1.8 branch.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Keywords: fixed1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•