jquery/jquery-ui — pull request #1345 by SimenB (2014-09-15 17:28:07+00:00)
Title: Selectmenu: When refreshing, set original tabindex

Hi,

This is done all wrong, as I'm unable to easily recreate it on JSFiddle or JSBin, so I thought I'd get some suggestions/feedback before filing the bug.

The problem is that if you trigger ``refresh`` on a selectmenu, and it's *not* disabled, the ``tabindex`` of the selectmenu is always set to 0, which messes up the tabbing-order.

This PR gets the ``tabindex`` from the backing ``select`` if enabling the menu.

In the test I wrote, you can see I commented out the first asserts. The problem with them is that the value is -1 (which is the problem I had in a fiddle). Is that a separate bug?