Closed Bug 1918655 Opened 1 year ago Closed 10 months ago

Wrong tab focused with `window.open(); window.close()`

Categories

(Firefox for Android :: Tabs, defect)

Firefox 133
All
Android
defect

Tracking

()

VERIFIED FIXED
136 Branch
Tracking Status
firefox131 --- wontfix
firefox132 --- wontfix
firefox133 --- wontfix
firefox136 --- verified

People

(Reporter: jgraham, Assigned: 007)

References

Details

(Keywords: webcompat:platform-bug, Whiteboard: [fxdroid][group4])

Attachments

(3 files)

Given three pages like the following:

test1.html

<!doctype html>
<p>This is the first page</p>
<a onclick="window.open('test2.html')">Click me</a>

test2.html

<!doctype html>
<p>This is the intermediate page</p>
<a onclick="window.open('test3.html'); window.close()">Click me</a>

test3.html

<!doctype html>
<p>This is the last page</p>

Then loading test1.html and following the instructions leads to the tab with test1.html focused and test3.html in the background. It's expected this leads to test3.html in the foreground. Note the dependency where this breaks (or at least causes user confusion) for an apple.com support flow.

The severity field is not set for this bug.
:007, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(nbond)

QE, could you please try to reproduce this and provide some STR?

Flags: needinfo?(nbond) → qe-verify+

The following STR were performed in order to attempt to reproduce this issue:

  1. Create all 3 html on the Android using a code editor app
  2. Install and use File Manager Plus to open the html files on Firefox for Android.
  3. Open the test1.html file > Tap on the “Click me” button.
  4. Once the test2.html file is opened, tap on the “Click me” button.
  5. Observe if the test3.html page is opened.

If I understood correctly, after Step 4, the test3.html page should be opened and focused.
Instead, the already opened test1.html is re-focused > then the the already opened test2.html is re-focused, and the test3.html is opened in a new tab in the background.
From here, each time the “Click me” button from test2.html is tapped, the test3.html is also opened in a new tab in the background, but never focused.

Tested with Google Pixel 8 Pro (Android 14) on all latest releases: Nightly 133.0a1, Beta 132.0b8, Release 131.0.3.

Severity: -- → S3
Flags: qe-verify+
Version: unspecified → Firefox 133
See Also: → 1899560
See Also: 1899560
Assignee: nobody → nbond
Status: NEW → ASSIGNED
Whiteboard: [fxdroid][group4]

Put together a test case here to make it easier to test without having to copy the html files to the device.

Pushed by nbond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ff9590c0079c Do not open the parent tab of a child tab if the child tab is not selected r=android-reviewers,boek
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
Flags: qe-verify+

Verified as fixed in latest Nightly 136.0a1 from 01/27 with Nothing Phone (2a) 5G (Android 14).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: