Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for issue 1157 - Collapsible block prevents page scrolling on iPh…

…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...
commit 7d9af0b2a8589953524b9f2dfc3895af12177e1e 1 parent dbd6847
@jblas jblas authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 js/jquery.mobile.collapsible.js
View
8 js/jquery.mobile.collapsible.js
@@ -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 );
Please sign in to comment.
Something went wrong with that request. Please try again.