jquery-archive / jquery-mobile

jQuery Mobile Framework
https://jquerymobile.com
Other
9.69k stars 2.41k forks source link

Collapsible - when starting a scroll gesture over one, kills scroll and toggles visibility #1056

Closed noisysocks closed 13 years ago

noisysocks commented 13 years ago

On iPhone (possibly other devices) using 1.0a3, when scrolling, if you begin your touch scroll gesture on a div with data-role="collapsible", no scrolling will occur and the collapsible will also toggle open/closed. The only way to use the page is to start a scroll away from the collapsible.

http://jquerymobile.com/test/#docs/content/content-collapsible.html

ghost commented 13 years ago

Also occurs on iPad

sanreel commented 13 years ago

Same here on Iphone and Android

ghost commented 13 years ago

I believe this was introduced with jquery/jquery-mobile@6711e11e972760ad0ebb03f4fdc0d9ef9b2ff9c6

collapsibleHeading.bind( $.support.touch ? "touchstart" : "click", function(){

changing "touchstart" to "tap" does seem to fix the scrolling issue, though it seems to introduce some weird and random behavior as to whether the collapsible will actually expand/collapse or just appear to refresh the page.

toddparker commented 13 years ago

In this regression, when you try to scroll the page, not only does it not scroll, it triggers the item to expand or collapse. Confirmed on iOS devices.

scottjehl commented 13 years ago

switched collapsibles over to tap event. Closed by f90d6cd5fbd36c9a53b9251563d5c880750bde80

slick540 commented 13 years ago

This does fix the scrolling issue but introduces another bug. Click on the collapsible example and you will see it expand then collapses immediately. For some reason it is triggering a click event and may be refreshing the page.

https://github.com/jquery/jquery-mobile/issues/1253

toddparker commented 13 years ago

We're very close to landing a completely new event system so this may be fixed then. Debugging this now may not make sense since it's going to be replaced...