Closed Bug 1674702 Opened 4 years ago Closed 4 years ago

Additional pair of blur and focus event gets fired while calling window.focus() on OOP iframe

Categories

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

defect

Tracking

()

RESOLVED FIXED
85 Branch
Fission Milestone M7
Tracking Status
firefox85 --- fixed

People

(Reporter: edgar, Assigned: edgar)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

STR:

  1. enable fission
  2. load https://codepen.io/edgarchen-the-decoder/full/xxOjjGX
  3. click window.focus() button to trigger window.focus() call

Expected result:
No additional blur and focus event.

Actual result:
Additional blur and focus event gets fired.

Blocks: 1660752
Assignee: nobody → echen
Status: NEW → ASSIGNED
Fission Milestone: --- → M7

One case of the additional focus event gets fired is from nsFocusManager::Focus call in nsFocusManager::WindowRaised where we always pass true as aNewDocument.

(Note to myself: rebase over bug 1618639)

I should update what I found, so basically I found following things that we should think about how to handle them,

Attachment #9187160 - Attachment is obsolete: true
Attachment #9187161 - Attachment is obsolete: true

This suppress unnecessary blur and focus actions in the framer, we would need
to find a way to notify framer that the focus has moved to OOP iframe to
dispatch corresponding blur event, see bug 1677474.

Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/15ceb99908ca Do not bounce IPC message to framer if focus is handled synchronously in OOP iframe; r=hsivonen
Failed to create upstream wpt PR due to merge conflicts. This requires fixup from a wpt sync admin.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/26977 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: