mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-04 20:54:46 +00:00
Fix for issue 1157 - Collapsible block prevents page scrolling on iPhone 4
- When we switched to virtual mouse events, I just did a straight translation of the code that existed which basically did the collapse/expand on mouseup. In order to factor in scrolling, I needed to move that code into a vclick handler and stopPropagation() and preventDefault() to make sure the button doesn't activate.
This commit is contained in:
parent
dbd68472b4
commit
7d9af0b2a8
1 changed files with 4 additions and 4 deletions
|
|
@ -121,6 +121,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|||
.not( "> .ui-collapsible-contain .ui-collapsible-contain" )
|
||||
.trigger( "collapse" );
|
||||
});
|
||||
|
||||
var set = collapsibleParent.find( ":jqmData(role=collapsible)" )
|
||||
|
||||
set.first()
|
||||
|
|
@ -133,16 +134,15 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|||
}
|
||||
|
||||
collapsibleHeading
|
||||
.bind("vmouseup", function(e){
|
||||
.bind("vclick", function(e){
|
||||
if( collapsibleHeading.is('.ui-collapsible-heading-collapsed') ){
|
||||
collapsibleContain.trigger('expand');
|
||||
}
|
||||
else {
|
||||
collapsibleContain.trigger('collapse');
|
||||
}
|
||||
e.preventDefault();
|
||||
})
|
||||
.bind("vclick",false );
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
})( jQuery );
|
||||
Loading…
Reference in a new issue