Open Bug 1226835 Opened 9 years ago Updated 3 years ago

Focusing on iframe fails in certain event listeners

Categories

(Core :: DOM: Events, defect, P5)

42 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: admin, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20151029151421

Steps to reproduce:

Attempt to set focus on an iframe via its focus() method from within an event listener (here, keydown).

Test case here:
http://jsfiddle.net/120ys896/1/


Actual results:

Pressing "1", which calls focus() from within the event handler, fails to focus on the iframe.  Pressing "2", which uses a setTimeout hack, succeeds in changing focus.



Expected results:

Both "1" and "2" should move focus from the body to the iframe.
Attached file 1226835.html (testcase) (obsolete) —
Component: Untriaged → DOM: Events
Product: Firefox → Core
The attachment version of the test case isn't working because the iframe at http://example.com/ won't load from https://bug1226835.bmoattachments.org/, and apparently the bug doesn't happen if the iframe doesn't load.  I've changed the URL to https://example.com/.
Attachment #8690371 - Attachment is obsolete: true

Bulk-downgrade of unassigned, untouched DOM/Storage bug's priority.

If you have reason to believe, this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: