59 bytes, text/x-review-board-request
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
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?
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.
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 firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/77229a598e9f API to open search results in new tab, r=mixedpuppy
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) → qe-verify-
Thanks, but you don't have to NI me for bugs. dev-doc-needed is the only incantation needed :).
-> 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).
Looks good, thanks Will.
You need to log in before you can comment on or make changes to this bug.