Closed Bug 1695135 Opened 4 years ago Closed 3 years ago

New window has no focus by window.open after window.close is called with Fission and xorigin

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

defect

Tracking

()

RESOLVED FIXED
89 Branch
Fission Milestone M8
Tracking Status
firefox89 --- fixed

People

(Reporter: m_kato, Assigned: edgar)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached mochitest works on non-fission (./mach mochitest dom/base/test/test_window_focus_by_close_and_open.html), but when running this with fission+xorigin (./mach mochitest --enable-fission --enable-xorigin-tests dom/base/test/test_window_focus_by_close_and_open.html), this isn't finished since 2nd new window cannot have focus. This occurs on APZ mochitests such as bug 1681211.

I guess that root cause is race condition since PBrowserBridge.Activate is async.

When window is closed, window focus is back to other window. So the focus of this test tries moving to parent window (test_window_focus_by_close_and_window.html). But since Activate is async, before backing focus to parent window, new window by window.open takes focus. Then, the focus moves to parent window unfortunately by window raised via async IPC call that is called before new window takes focus.

Severity: -- → S3
Priority: -- → P3

Edgar, can you look into this, please?

Fission Milestone: --- → M8
Flags: needinfo?(echen)

(In reply to Neha Kochar [:neha] from comment #1)

Edgar, can you look into this, please?

Sure, I will take a look.

Assignee: nobody → echen
Flags: needinfo?(echen)

I could not reproduce this after applying patches of bug 1691892 and bug 1696908.

Okay, I check again, the patch in bug 1696908 fix this.

Depends on: 1696908
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6805fd964bd5
Add test for window focus by calling window.close() and window.open(); r=hsivonen
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Regressions: 1702373
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: