Closed Bug 1665752 Opened 4 years ago Closed 4 years ago

Additional pair of blur and focus event gets fired while triggering the accesskey shortcut on OOP iframe

Categories

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

defect

Tracking

()

RESOLVED FIXED
84 Branch
Fission Milestone M6c
Tracking Status
firefox84 --- fixed

People

(Reporter: edgar, Assigned: edgar)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Attached file test.html

After triggering the accesskey shortcut, for example, control + option + a on Mac, there is additional pair of blur and focus event gets fired. Like,

onfocus: target: https://bugzilla.mozilla.org/show_bug.cgi?id=1661415
onclick: target: https://bugzilla.mozilla.org/show_bug.cgi?id=1661415
onblur: target: https://bugzilla.mozilla.org/show_bug.cgi?id=1661415
onfocus: target: https://bugzilla.mozilla.org/show_bug.cgi?id=1661415

Where there is only one focus event on non-Fission

onfocus: target: https://bugzilla.mozilla.org/show_bug.cgi?id=1661415
onclick: target: https://bugzilla.mozilla.org/show_bug.cgi?id=1661415

Severity: -- → S3
Priority: -- → P2

I also saw similar behavior on tab key navigation in OOP iframe.

Blocks: 582459

nsFocusManager::GetFocusedDescendant only returns the focused descendant within
the same browsing context boundary, so we don't expose aFocusIsOutOfProcess
if the frameLoad acts as boundary, either.

Assignee: nobody → echen

https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=66a6fe1b202d2790cfb914a57b83ecb9a512ff07

I have a WIP that could avoid additional pair of blur and focus events.
But almost all xorigin test on try gets timed out due to the lack of focus event. :(

(In reply to Edgar Chen [:edgar] from comment #6)

https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=66a6fe1b202d2790cfb914a57b83ecb9a512ff07

I have a WIP that could avoid additional pair of blur and focus events.
But almost all xorigin test on try gets timed out due to the lack of focus event. :(

What the WIP does is to check mFocusedBrowsingContext in nsFocusManager::SetFocusInner, if the mFocusedBrowsingContext already pointers to embeded browsing context that lives in a different process, then parent window don't need to to anything for the frame-focus-request given that the out-of-process iframe already has the focus. However, mFocusedBrowsingContext seems to not be accurate any more after process switching or navigate happens on focused browsing context.

Status: NEW → ASSIGNED
Fission Milestone: --- → M6c
Attachment #9177128 - Attachment is obsolete: true
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f4242b119e61
Do not send IPC to request focus if the browsing context already has the focus; r=hsivonen
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: