Ticket #12319 (closed bug: patchwelcome)
IE - input tag in iframe has problem with focus
|Reported by:||dimhold@…||Owned by:|
I dynamically create iframe with <input type="text" /> tag and focus on it. But on the second creation, all inputs on the page have problem with focus.
Please, download this attachment zip file (issue doesn't reproduce in the jsFiddle): http://www.wuala.com/dimhold/jquery/ie_input_in_iframe_has_problem_with_focus.zip
Steps to reproduce: 0) Open main.html from zip 1) Click to "Open (jQuery)" button 2) Click to text input in created IFRAME!!! (browser should focus to the text field) 3) Click to "Close (jQuery) link
4) Click to "Open (jQuery)" button AGAIN 5) Click to to text input in created iframe AGAIN
Actual: IE7: You cannot focus to any inputs on the ALL page! (check bottom input) IE8: Input has problem with focus on the some time (sometimes forever)... After 3 seconds and 3 click browser focus on it... IE9: I cannot reproduce this issue on this simple case. But on my very rich application, IE9 has problem with focus too.
Expected: You can focus to the any inputs.
"Workaround": You can press "Tab" or focus to input by js (e.g. document.getElementById("field").focus(); ) and the problems goes on... I guess it is IE bug and jQuery works excellent (of course). But when I create iframe without jQuery (Using "Open (js) button") issue does not reproduce.