Closed
Bug 1303362
Opened 8 years ago
Closed 7 years ago
Handle links that open new tabs in Custom Tabs
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(firefox53 fixed)
RESOLVED
FIXED
Firefox 53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: droeh, Assigned: droeh)
References
Details
Attachments
(1 file, 1 obsolete file)
8.95 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
When a link clicked in a custom tab opens a new tab, we stay in the custom tabs activity. This is fairly opaque, as a user will not see any sign that the link has opened in a new tab, but navigation will be affected. Probably we want to open the link in Fennec in this case.
Comment 1•8 years ago
|
||
(In reply to Dylan Roeh (:droeh) from comment #0) > Probably we want to open the link in Fennec in this case. If I understand correctly, shouldn't a link that wants to be opened in a new tab, be forced into the same custom tabs activity so that it doesn't open as a background tab? Looking at Chrome's impl, this seems to be what they do as well, along with removing the menu options to open a link in a tab when Chrome is used as a custom tab. An (unpreferred) alternative is to have a snackbar that notifies that a tab was opened in the background and the option to navigate to fennec to look at it.
Assignee | ||
Comment 2•8 years ago
|
||
My thought was not to open it as a background tab, but to actually switch to Fennec when such a link is clicked (by using an intent to open it in Fennec or something like that). But if Chrome just opens such links in the custom tab without creating a new tab, maybe that's a better way to go.
Assignee | ||
Comment 3•7 years ago
|
||
I'm going to WONTFIX this; I wrote up a mostly-working version of launching Fennec for links that want to be opened in a new tab, but it involves some ugly workarounds and basically seems worse, from a UX perspective, than just copying what Chrome does.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Comment 4•7 years ago
|
||
Oh, just yesterday I was thinking about this issue. Chrome just hides the option to do that (or implements a completely different context menu), right?
Assignee | ||
Comment 5•7 years ago
|
||
This is actually just about links that would normally open in a new tab (eg target="_blank"); the context menu for links is a whole other thing that I'm probably going to leave to front end people :) Reopening this because yesterday I thought I could solve it as part of bug 1325174, but that turned out to be a bad idea.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Assignee | ||
Comment 6•7 years ago
|
||
This sets a flag on custom tabs to prevent them from opening links in a new tab.
Attachment #8821185 -
Flags: review?(snorp)
Comment on attachment 8821185 [details] [diff] [review] Prevent links from opening in a new tab in custom tabs Review of attachment 8821185 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/java/org/mozilla/gecko/GeckoApp.java @@ +1587,5 @@ > } > if (isFirstTab) { > flags |= Tabs.LOADURL_FIRST_AFTER_ACTIVITY_UNHIDDEN; > } > + if (isCustomTab()) { Don't do this, just add a getNewTabFlags() method that lets CustomTabsActivity return what it wants
Attachment #8821185 -
Flags: review?(snorp) → review-
Assignee | ||
Comment 8•7 years ago
|
||
Fair enough, this patch handles the flags that way.
Attachment #8821185 -
Attachment is obsolete: true
Attachment #8824248 -
Flags: review?(snorp)
Attachment #8824248 -
Flags: review?(snorp) → review+
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/090e52000b34 Set a flag on custom tabs so that links do not open in a new tab. r=snorp
I had to back this out for android failures like https://treeherder.mozilla.org/logviewer.html#?job_id=68037786&repo=mozilla-inbound https://hg.mozilla.org/integration/mozilla-inbound/rev/9eb97c0a2a7b
Flags: needinfo?(droeh)
Comment 11•7 years ago
|
||
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/657cf05df28d Set a flag on custom tabs so that links do not open in a new tab. r=snorp
Comment 12•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/657cf05df28d
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(droeh)
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•