API to open search results in new tab

RESOLVED FIXED in Firefox 59

Status

enhancement
P2
normal
RESOLVED FIXED
2 years ago
11 months ago

People

(Reporter: mconca, Assigned: bsilverberg)

Tracking

(Depends on 1 bug, Blocks 2 bugs, {dev-doc-complete})

57 Branch
mozilla59
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox59 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

2 years ago
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.

Comment 1

2 years ago
Bob, could we look at landing an API for this please?
Assignee: nobody → bob.silverberg
Priority: -- → P2

Updated

2 years ago
Component: WebExtensions: Untriaged → WebExtensions: General
Assignee

Comment 2

2 years ago
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)
Assignee

Updated

2 years ago
Depends on: 1421274
Reporter

Comment 3

2 years ago
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)

Updated

2 years ago
Blocks: 1311472
Comment hidden (mozreview-request)

Comment 5

2 years ago
mozreview-review
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+

Comment 6

2 years ago
Pushed by bsilverberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/77229a598e9f
API to open search results in new tab, r=mixedpuppy

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/77229a598e9f
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59

Comment 8

2 years ago
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)
Assignee

Updated

2 years ago
Flags: needinfo?(bob.silverberg) → qe-verify-
Reporter

Updated

a year ago
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)

Updated

a year ago
Blocks: 1442843

Updated

11 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.