focus handling seems to be broken in fission window
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: hiro, Assigned: hsivonen)
References
Details
Attachments
(2 files, 1 obsolete file)
I am bit confused, it may not be a problem at all.
Steps to reproduce
- Open https://hsivonen.fi/fission-host.html
- Click somethere in one of iframes there
- You will see a "iframe [object Window] focus"
- Click again somewhere in the same iframe
- You will see a pair of "iframe [object Window] blur" and "iframe [object Window] focus"
In non Fission window, you will never see the pair of "blur" and "focus".
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
Sorry the attachment in comment 0 is not necessary at all. I was initially thinking the issue happens only in nested iframes.
Comment 2•3 years ago
•
|
||
Henri is looking into Fission focus and bug 1613054 may be related.
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Preliminary guess: Upon click, we always try to "raise" the PuppetWidget
window of the OOP iframe even if it already has focus.
It looks like we need some check that makes sense for OOP iframes here, where we even have a comment hinting at a problem:
https://searchfox.org/mozilla-central/rev/d54210d490ef335b13fc1fcac817525120c8c46b/dom/base/nsFocusManager.cpp#2738
The obvious solution is checking against the focused browsing context, but I need to think more carefully about the case where the OOP iframe tree is deeper.
Assignee | ||
Comment 4•3 years ago
|
||
Assignee | ||
Comment 5•3 years ago
|
||
Assignee | ||
Comment 6•3 years ago
|
||
(In reply to Neha Kochar [:neha] from comment #2)
Henri is looking into Fission focus and bug 1613054 may be related.
At this point, it looks like this in unrelated to bug 1613054.
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
•
|
||
The currently-attached patch leaves the observable order of the click and focus events in the OOP iframe reversed compared to the non-Fission case. Let's leave potentially changing that as a follow-up.
Assignee | ||
Comment 8•3 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #7)
The currently-attanche patch leaves the observable order of the click and focus events in the OOP iframe reversed compared to the non-Fission case. Let's leave potentially changing that as a follow-up.
Filed as bug 1660805 (bug not introduced by the fix here).
Assignee | ||
Comment 9•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 10•3 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #3)
I need to think more carefully about the case where the OOP iframe tree is deeper.
Per discussion with Neha, spinning this off into a follow-up: bug 1661227.
Assignee | ||
Comment 11•3 years ago
|
||
Comment 12•3 years ago
|
||
Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b162b405a551 Avoid re-raising the PuppetWidget of an already-focused OOP iframe upon click. r=nika https://hg.mozilla.org/integration/autoland/rev/998f1372ebe0 test - Test clicking and already-focused OOP iframe and test moving focus between nested OOP iframes. r=nika
Comment 13•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b162b405a551
https://hg.mozilla.org/mozilla-central/rev/998f1372ebe0
Description
•