Closed Bug 1420969 Opened 7 years ago Closed 7 years ago

API to open search results in new tab

Categories

(WebExtensions :: General, enhancement, P2)

57 Branch
enhancement

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: mconca, Assigned: bsilverberg)

References

(Blocks 2 open bugs)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Add a WebExtensions API to specify if search results should open in the current page or a new tab.  This basically exposes the browser.search.openintab preference.

This feature was popular with Tab Mix Plus users and the China repack of Firefox.
Bob, could we look at landing an API for this please?
Assignee: nobody → bob.silverberg
Priority: -- → P2
Component: WebExtensions: Untriaged → WebExtensions: General
I have implemented this as a browserSetting, but when I went to test it I found that it doesn't work particularly well. It seems that this pref only takes effect if a search is performed from the search box (which by default is not present on 57+) and even then, only if one presses enter when searching from there. It doesn't take effect if one clicks the arrow in the search box.

Bug 429183 seems to be open about the former (although that's a really old bug and isn't necessarily an exact duplicate) and bug 513180 is somewhat about the latter, although again not an exact duplicate.

I'm not sure that it's a good idea to expose this preference to extensions if it doesn't really work as expected. At a minimum I would expect that any searches from the awesome bar (with the search box hidden) would open in a new tab with this preference, but that does not seem to be the case.

What do you think, Mike?
Flags: needinfo?(mconca)
Depends on: 1421274
It looks like the issue with the awesomebar is captured in bug 1394304. At one point a patch was landed, but then backed out. It isn't clear where that bug is going right now.  The issues with the mouse click in bug 513180 is fairly minor, in my opinion.

I think we should go ahead and land this API in 58. It isn't ideal from a UX perspective, but we can hopefully get that ironed out. With 57 making the awesomebar the defacto search bar, I think there will be sufficient desire make the UX work better.
Depends on: 1394304, 513180
Flags: needinfo?(mconca)
Blocks: 1311472
Comment on attachment 8932888 [details]
Bug 1420969 - API to open search results in new tab,

https://reviewboard.mozilla.org/r/203918/#review209494
Attachment #8932888 - Flags: review?(mixedpuppy) → review+
Pushed by bsilverberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/77229a598e9f
API to open search results in new tab, r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/77229a598e9f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Is manual testing required on this bug? If yes, please provide some STR and the proper extension(if required) or set the “qe-verify -“ flag.

Thanks!
Flags: needinfo?(bob.silverberg)
Flags: needinfo?(bob.silverberg) → qe-verify-
Flags: needinfo?(wbamberg)
Keywords: dev-doc-needed
Thanks, but you don't have to NI me for bugs. dev-doc-needed is the only incantation needed :).
Flags: needinfo?(wbamberg)
-> https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browserSettings/openSearchResultsInNewTabs

Please let me know if this covers it (note that the compat data is not deployed to MDN yet, but will be soon).
Flags: needinfo?(bob.silverberg)
Looks good, thanks Will.
Flags: needinfo?(bob.silverberg)
Blocks: 1442843
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: