Search and Top Navigation
#8438 closed bug (notabug)
Opened July 11, 2012 03:06PM UTC
Closed July 16, 2012 02:08PM UTC
UI 1.9 Spinner - Order of Events Firing in IE is Wrong
Reported by: | CyrixInstead | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.core | Version: | git (not yet released) |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you have two spinners and you spin one then the other straight after (without doing anything in between), the order that the spinner events fire in is different in IE to other browsers.
See my simple example at http://jsfiddle.net/CyrixInstead/8P55F/1/.
My example has two spinners, and all you need to do is spin the first and then spin the second, then check the console log. You will see that in IE the second spinner's spin event fires before the first spinner's change event.
In other browsers the order is as I would expect, so the first spinner's change event fires before the second spinner's spin event.
Attachments (0)
Change History (1)
Changed July 16, 2012 02:08PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
We don't accept tickets for unreleased plugins. Normally we would move the comment to the planning wiki, but this is not something we can fix. On mousedown on the button, we call
event.preventDefault()
to prevent moving focus to the button, we then call.focus()
on the text field (if it doesn't already have focus). Unfortunately IE will not allow us to prevent the button from gaining focus. However, IE handles focus asynchronously, so the second spinner spins before the blur event occurs on the first spinner. Since change is tied to blur, there's no way we can properly handle this. Managing focus between multiple elements is impossible to do synchronously in IE. We go through a lot of work to make the widgets work as well as they can and try to treat the asynchronous focus handling as if it were synchronous, but it's impossible to make the widgets actually behave synchronously in IE without a ton of hacks.