Browse files

Selectmenu: use _hoverable and _focusable for button events

  • Loading branch information...
1 parent 29effb3 commit 96102f7692ca213267e8efa42393562b2503fb7c @fnagel fnagel committed Feb 23, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 ui/jquery.ui.selectmenu.js
View
10 ui/jquery.ui.selectmenu.js
@@ -51,6 +51,8 @@ $.widget( "ui.selectmenu", {
this._drawButton();
this._bind( this.button, this._buttonEvents );
+ this._hoverable( this.button );
+ this._focusable( this.button );
this._drawMenu();
@@ -77,13 +79,13 @@ $.widget( "ui.selectmenu", {
'aria-autocomplete': 'list',
'aria-owns': this.ids.menu,
'aria-haspopup': true
- });
-
+ });
+
this.button.prepend( $( '<span class="ui-icon ' + ( this.options.dropdown ? 'ui-icon-triangle-1-s' : 'ui-icon-triangle-2-n-s' ) + '"/>' ) );
-
+
this.buttonText = $( '<span />', {
'class': 'ui-selectmenu-text' ,
- html: this.element.find( "option:selected" ).text() || '&nbsp;'
+ html: this.element.find( "option:selected" ).text() || '&nbsp;'
})
.appendTo( this.button );

0 comments on commit 96102f7

Please sign in to comment.