Bug Tracker

Modify

Ticket #12319 (closed bug: patchwelcome)

Opened 10 months ago

Last modified 10 months ago

IE - input tag in iframe has problem with focus

Reported by: dimhold@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocking: Blocked by:

Description

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.

Change History

comment:1 Changed 10 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to patchwelcome

I could not reproduce this problem on IE8 in a VM, but it did fail the way you described in IE7 on Browserstack. The problem does not occur if you change the jQuery creation to this method:

  var $iframe = $("<iframe/>");
  $iframe.attr("src", "iframe.html");
  $("#qres_modal_dialog_contents").html("").append($iframe);

Given that there is a reasonable workaround and this hasn't been reported before, I doubt the team will look into it further. If anyone is interested in investigating please contact us.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.