mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-28 01:44:45 +00:00
merge from origin selectmenu fixes
This commit is contained in:
commit
d94e25acd6
1 changed files with 8 additions and 10 deletions
|
|
@ -154,8 +154,15 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
//disable if specified
|
||||
if( o.disabled ){ this.disable(); }
|
||||
|
||||
//events on native select
|
||||
select
|
||||
.change(function(){
|
||||
self.refresh();
|
||||
});
|
||||
|
||||
//support for using the native select menu with a custom button
|
||||
if( o.useNativeMenu ){
|
||||
|
||||
select
|
||||
.appendTo(button)
|
||||
.bind( "touchstart mousedown", function( e ){
|
||||
|
|
@ -176,6 +183,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
|
||||
button.attr( "tabindex", "-1" );
|
||||
} else {
|
||||
|
||||
select
|
||||
.attr( "tabindex", "-1" )
|
||||
.focus(function(){
|
||||
|
|
@ -183,16 +191,6 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
button.focus();
|
||||
});
|
||||
|
||||
//events on native select
|
||||
select
|
||||
.change(function(){
|
||||
self.refresh();
|
||||
})
|
||||
.focus(function(){
|
||||
$(this).blur();
|
||||
button.focus();
|
||||
});
|
||||
|
||||
//button events
|
||||
button
|
||||
.bind( "touchstart" , function( event ){
|
||||
|
|
|
|||
Loading…
Reference in a new issue