Opened 7 years ago

Closed 7 years ago

#8438 closed bug (notabug)

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.

Change History (1)

comment:1 Changed 7 years ago by Scott González

Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.