allow scroll to work when touch start begins on a select button. Fixes #804

This commit is contained in:
scottjehl 2011-01-14 10:35:26 -05:00
parent 0413542753
commit 87c7b57da9

View file

@ -159,10 +159,19 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
});
//button events
button.bind( $.support.touch ? "touchstart" : "click", function(event){
self.open();
event.preventDefault();
});
button
.bind( $.support.touch ? "touchend" : "click" , function( event ){
if( $( this ).data( "moved" ) ){
$( this ).removeData( "moved" );
}
else{
self.open();
event.preventDefault();
}
})
.bind( "touchmove", function(event){
$( this ).data( "moved", true );
});
//events for list items
list.delegate("li:not(.ui-disabled, .ui-li-divider)", "click", function(event){