Skip to content
Browse files

Selectmenu: This reverts commit 36e6c44.

  • Loading branch information...
1 parent 36e6c44 commit b7df9e45cdce8846080528e31059700a9001b6f0 @fnagel fnagel committed Jan 27, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 ui/jquery.ui.selectmenu.js
View
6 ui/jquery.ui.selectmenu.js
@@ -141,9 +141,9 @@ $.widget( "ui.selectmenu", {
}
if ( !that.isOpen ) {
that._select( item, event );
- }
- that.focus = item.index;
- }
+ }
+ }
+ that.focus = item.index;
@fnagel
jQuery Foundation member
fnagel added a note Jan 26, 2012

item is undefined in "common widget: basic usage" unit test. I have no idea why. Help please!

@rdworth
rdworth added a note Jan 27, 2012

One of the common widget unit tests is that all widgets should be able to be initialized based on their default element and using default options (no options passed to init). This failure minimizes down to

$( "<select>" ).appendTo( "body" ).selectmenu()

notice it's because the select (the default element for selectmenu) has no options. So this would pass

$( "<select><option></select>" ).appendTo( "body" ).selectmenu()

but the former needs to pass as well.

@fnagel
jQuery Foundation member
fnagel added a note Jan 27, 2012

So its about how to handle an empty select tag. Which leads to the question how to handle empty options or even empty optgroups.
I fixed this problem and in general handling of empty tags. Empty oprgroups wont be displayed atm.

Thanks for helping out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
})
// change ARIA role

0 comments on commit b7df9e4

Please sign in to comment.
Something went wrong with that request. Please try again.