Opening links with target _blank opens the page in two tabs if done from a custom tab
Categories
(Firefox for Android :: PWA, defect)
Tracking
()
People
(Reporter: cpeterson, Unassigned)
References
Details
From github: https://github.com/mozilla-mobile/android-components/issues/11759.
- Install a PWA (e.g. twitter.com)
- Open a custom tab within the PWA, e.g. click on an external link in Twitter
- Notice how two identical sessions get created, e.g. using DevTools
reproduced on the latest Fenix Nightly
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Comment 1•3 years ago
|
||
The severity field is not set for this bug.
:cpeterson, could you have a look please?
For more information, please visit auto_nag documentation.
| Reporter | ||
Updated•3 years ago
|
Updated•2 years ago
|
Comment 2•2 years ago
|
||
facing the same issue
asked question on support
It doesn't have to be a PWA.
If you open links with target="_blank", 2 windows open. I have an app that needs the window.parent reference to send postmessages about activity in the opened window. But the window with parent reference is not shown to the user and the duplicate window shown to user doesn't have parent reference.
Comment 3•2 years ago
|
||
(In reply to amaljossy1 from comment #2)
Made a mistake in the last comment, I meant to say window.opener instead of window.opener
Can we change the priority to S2, this breaks functionality.
- Cannot communicate to parent as
window.openeris null in the second window - Cannot perform childWindowReference.close() as the opener window doesn't have a reference to the second child window
| Reporter | ||
Comment 4•2 years ago
|
||
Hi Amal, thanks for clarifying that this bug can happen with custom tabs that are not in a PWA. Thanks for the steps to reproduce
Steps to reproduce from https://support.mozilla.org/en-US/questions/1418327:
- Open a page in custom tab powered by Firefox Android
- Click on a link in the page that should've opened in new tab, such as a link with
target="_blank". - Firefox will open two tabs, in total 3 tabs will be there, parent tab, child tab, clone of child tab. Child tab will have window.opener reference. Clone tab won't. User will be seeing the clone tab but not child tab
The opened tabs will be visible on developer tools
The child tab becomes an orphan, not visible in the custom tab or browser, disappears only when firefox app is force closed
Comment 5•2 years ago
|
||
In my observation. Once a link with target="_blank" clicked , In developer tools , there are two "about:blank" tabs opened, then one "about:blank" auto closed ,the other become real page (in Custom Tab). Only two Tabs remain, the parent and one child.
The new opened page in Custom Tab is opened via Intent https://github.com/mozilla-mobile/firefox-android/blob/main/android-components/components/feature/customtabs/src/main/java/mozilla/components/feature/customtabs/CustomTabWindowFeature.kt#L94
The call stack after receiving intent
mozilla.components.feature.tabs.CustomTabsUseCases$AddCustomTabUseCase.invoke(CustomTabsUseCases.kt:52)
mozilla.components.feature.customtabs.CustomTabIntentProcessor.process(CustomTabIntentProcessor.kt:60)
org.mozilla.fenix.IntentReceiverActivity.processIntent(IntentReceiverActivity.kt:77)
org.mozilla.fenix.IntentReceiverActivity.onCreate(IntentReceiverActivity.kt:50)
In Fenix view it is just another Custom Tab created by foreign Intent. so i think the child will never have parent reference?
Comment 9•2 years ago
|
||
I was able to reproduce this issue on both Fenix Beta 122.0b7, and Nightly 123.0a1 from 1/10 using a Google Pixel 6 (Android 14).
I had twitter, and instagram installed as PWA's, and when I opened custom tabs --> two custom tabs were displayed in about:debugging.
Updated•2 years ago
|
| Reporter | ||
Comment 10•1 year ago
|
||
Clearing Priority so we can reprioritize these bugs relative to our ux-fun-2024 bugs.
Description
•