iron-swipeable-container icon indicating copy to clipboard operation
iron-swipeable-container copied to clipboard

Vertical scrolling of the page is prevented

Open nschurando opened this issue 9 years ago • 4 comments

Swipeable elements within the iron-swipeable-container prevent the page from vertically scrolling, even when they have the disable-swipe attribute.

Maybe this is related to issue #5 as it seems to me that vertical scrolling should be given priority over swiping which should occur only after a certain distance.

nschurando avatar Dec 17 '15 14:12 nschurando

Hey @notwaldorf any update on this?

I was looking into the source and noticed it seemed to be caused by the track event. Wish there was a way to only have horizontal/vertical tracking events.

Digikid13 avatar Mar 22 '16 00:03 Digikid13

I did a quick and dirty "fix" on this for my own purpose : code is there https://code.scity.coop/polymer-elements/ridygo-swipeable-container (most likely to be up-to-date with my changes in the future as it's my company's git server) or there on Github https://github.com/Ridygo/ridygo-swipeable-container .

(I also prevented swiping to the right (swipe left only) and made the swipe effect only effective after some time to prevent the swipe effect while just scrolling : you might want to remove that before using this modified element)

I also didn't update the tests and didn't check if the demo passes, so not ready at all for a push request right now ;)

adelcasse avatar Aug 17 '16 09:08 adelcasse

I'm also experiencing this myself. I'm writing a photo gallery and I want the ability to swipe right/left to go to the next or previous image. It works great, but it seems the track event prevents any vertical scrolling. Maybe, if the component detects a positive or negative change in the y coordinate, and the change in x is small, the page could scroll. This is only an issue on mobile, but that's primarily where the user would want to swipe anyway. I love the element otherwise!

noamichael avatar Dec 17 '16 20:12 noamichael

I'm running into this too! Please fix this :)

Boscop avatar Jan 24 '17 03:01 Boscop