Closed Bug 703450 Opened 8 years ago Closed 8 years ago

Restore tabs when waking up, always open external links in new tab


(Firefox for Android :: General, defect, P3)




Firefox 12
Tracking Status
firefox11 --- verified
firefox12 --- verified
fennec 11+ ---


(Reporter: philikon, Assigned: mfinkle)




(1 file)

Let's say you're reading a page but you take a break to work for a while in another app. In the mean time Fennec gets killed. The app you're in by now prompts you to open a link in a browser, so Fennec gets reactivated. Right now this new link gets opened in the same tab of the page you were reading. This is rather annoying. IMHO it should always get opened in a new tab.

So, the corollary here is that basically links opened from other apps end up piling onto the tab count and you may easily end up with lots of open tabs. I've been debating the pros and cons of that, but I think the pros win for the following reasons:

* The tab discovery mechanism that's new in Fennec native is excellent. It takes up very little space, and the number is very indicative of how many pages are lurking back there. (This is *way* better than what happens in the stock browser.)

* Non-foreground tabs don't have to actually be loaded, so they're very cheap.
Madhava, we need to know what you want to do here
Assignee: nobody → madhava
Priority: -- → P3
We should definitely open external links in new tabs.

Might be related to bug 704116 and/or bug 708560. Both of those could be affected by a partial implementation of nsIBrowserDOMWindow.
* Opening external tabs should never replace existing tabs
* Current BACK button behavior will close a tab opened from an external app _and_ go back to the app. This should prevent the "tabs piling up" problem.
Attached patch patchSplinter Review
Forces external links to be opened in a new tab.

I checked for occurrences of GeckoEvent(url) being called. Those will send the url to BrowserCLH.js and it seems that only onNewIntent is doing it. This is what we want.

Note: The initial launch will also send a potential URL to BrowserCLH too, but via GeckoStart:

We don't need to worry about that one as much. Although, it's not tagged as external in this case. Might need a follow up bug for that.
Assignee: madhava → mark.finkle
Attachment #586425 - Flags: review?(mbrubeck)
Attachment #586425 - Flags: review?(mbrubeck) → review+
(In reply to Mark Finkle (:mfinkle) from comment #4)

> We don't need to worry about that one as much. Although, it's not tagged as
> external in this case. Might need a follow up bug for that.

That one got filed as bug 715936 I think
Blocks: 708560
Target Milestone: --- → Firefox 12
Closed: 8 years ago
Resolution: --- → FIXED
tracking-fennec: --- → 11+
Comment on attachment 586425 [details] [diff] [review]

[Approval Request Comment]Fix is needed to get the right "external link" opening behavior
Attachment #586425 - Flags: approval-mozilla-aurora?
Comment on attachment 586425 [details] [diff] [review]

[Triage Comment]
Mobile only - approving for Aurora.
Attachment #586425 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 716430
Filed 716430 as a possible follow-up to this bug yesterday.
Verified with:
Aurora 11.0a2 (2012-01-11) Samsung Nexus S (Android 2.3.6)
Nightly 12.0a1 (2012-01-10) Samsung Nexus S (Android 2.3.6)

Link from another app is opened in a new tab. When pressing back user is returned to external app.
You need to log in before you can comment on or make changes to this bug.