iron-swipeable-container
iron-swipeable-container copied to clipboard
Vertical scrolling of the page is prevented
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.
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.
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 ;)
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!
I'm running into this too! Please fix this :)