Closed Bug 787842 Opened 12 years ago Closed 12 years ago

If a focused iframe is removed from the current document, keyboard focus becomes lost and key events go nowhere

Categories

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

16 Branch
x86_64
Windows 7
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 584329

People

(Reporter: kael, Unassigned)

References

()

Details

If an iframe is focused when it is removed from the current document, keyboard focus becomes lost and key events go nowhere. Note that document.activeElement indicates that focus is somewhere other than where it actually is. Calling .blur() and .focus() in any combination on any elements does not appear to fix this - the user has to click onto the document to move focus manually. http://www.playescapegoat.com/'s level browser has focus issues due to this. How to reproduce with the URL: Press some keys and observe the textarea filling up. Click 'create iframe'. Click into the iframe to focus it. Press some keys, observe no events being captured by parent document. Click 'destroy me' in the iframe. Observe how the activeElement is the body but if you press keys, the input events go nowhere. This works correctly in Chrome.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.