Opened 10 years ago
Closed 10 years ago
#13934 closed bug (notabug)
Dialog - "autofocus" attribute do not work in IE sometimes
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I tested this bug is found at least found in IE8-9 The jQuery ui version tested is 1.10.3
If user edit a textfield A, and then click textfield B immediately, at the same time, the onchange event of A open a dialog for data verification purpose.
The focus will remain in textfield A, which is very bad behaviour for data verification dialog
jsbin and jsfiddle do not work with IE8, so i post my code here
<!doctype html> <html> <head> <meta charset="utf-8" /> <title></title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <script> function showdialog(){ $( "#dialog" ).dialog(); //workaround setTimeout( function(){ document.activeElement.blur(); testinput.focus(); } ,10000); //10s timeout } </script> </head> <body> <div id="dialog" style="display:none"> The autofocus do not work in IE (workaround will focus it after 10s) <br/> <input id=testinput autofocus /> </div> Type a few letter in this textarea and click another textarea immediately.<input onchange="showdialog();" /> <br/> <br/> <br/> <input > </body> </html>
Change History (3)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
The test code will not function in jsbin and jsFiddle for IE at all.
The test code must be saved as a html file and then open by IE
comment:3 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
This is the jQuery core bug tracker. You may want the UI bug tracker but perhaps should ask for help on a forum first. http://bugs.jqueryui.com
There is no version "1.10.3" for selection when create ticket, please change to 1.10.3