Search and Top Navigation
#9332 reopened bug ()
Opened May 27, 2013 11:29PM UTC
Last modified September 16, 2013 01:11PM UTC
Dialog: Focus not placed in dialog when it's opened in a change event in IE
Reported by: | lsching17 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.dialog | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I tested this bug is found at least found in IE8-10.
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
Attachments (0)
Change History (7)
Changed May 28, 2013 02:16AM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
Changed May 28, 2013 11:58AM UTC by comment:2
There is no documentation mentions that "autofocus" do not always work cross-browser, this is a trap for developer!
Besides, have you tested that user can still edit text in textfield A behind the modal dialog? Does this beat the purpose of modal dialog?
Will there be a chance for jquery ui to include the workaround for IE: unblur the active element and then focus by settimeout?
As dialog is async in nature, there should be no change in behaviour.
Changed May 28, 2013 12:18PM UTC by comment:3
If you use the
blurevent this will work as you expect in IE: http://jsfiddle.net/tj_vantoll/e5v9v/.
I'll defer to others as whether this is something that we *can* do as there are a11y repercussions of changing our dialog focus handling. In theory we might be able to wrap our
focus()call in a
setTimeout. That being said showing a dialog in a
changeevent is definitely an edge case.
Changed May 29, 2013 11:46AM UTC by comment:4
if this is the case, please document the shortcoming of IE on dialog's page to remind others, thank you.
Changed May 29, 2013 03:38PM UTC by comment:5
resolution: | wontfix |
---|---|
status: | closed → reopened |
summary: | "autofocus" attribute do not work in IE sometimes → Dialog: Focus not placed in dialog when it's opened in a change event in IE |
Changed September 16, 2013 01:05PM UTC by comment:6
So this is only a documentation issue? If so, TJ, could you create a ticket for api.jqueryui.com?
Changed September 16, 2013 01:11PM UTC by comment:7
I'd like to dig into this before finalizing a decision that this is a can't fix.
This is just the nature of IE's focus handling and there's really nothing we can do to help your use case.
Example: http://jsbin.com/eqomuq/11/edit
Type something in the 1st text box then click on the 2nd. There's an event handler that will shift focus to the third text box that will work everywhere but in IE.
You can put a
around the event handler to workaround this: http://jsbin.com/eqomuq/12/edit.