Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Fix for issue 1157 - Collapsible block prevents page scrolling on iPh…
Browse files Browse the repository at this point in the history
…one 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.
  • Loading branch information
jblas committed Apr 19, 2011
1 parent dbd6847 commit 7d9af0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/jquery.mobile.collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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 );

0 comments on commit 7d9af0b

Please sign in to comment.