Can't scroll past Flickity on touch device
Flickity works fine - but I can't swipe passed it. It takes up the full viewport (which I want it to) but up and down swiping looks to be bound to the left/right slide navigating of flickity so there is no way to get to the content on the page below?
I'm sorry to see you're having trouble with Flickity. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.
Thanks Desandro - http://codepen.io/anon/pen/Bybzxb
So the issue is on an iPhone once you've scrolled down to where flickity sits I can navigate flickity absolutely fine - I just can't scroll past. There are no dom elements surrounding it that I can drag over.
Ideally I'm hoping for any vertical swipe allowing the user to continue down the dom (or up)
Thanks
This is down to the touchVerticalScroll and will be addressed by #67 I can't wait until that is fixed as it's causing some serious issues on a current project I'm working on.
Thanks Evo - what solution are you going for - a different lib?
Thanks for the demo. Looks like CodePen has a bug where demo/live views cannot have their scroll set. But you can see a proper demo in the debug view. See debug CodePen http://codepen.io/desandro/debug/XJGNyr
On this demo, I'm able to scroll. On your demo, you have set touchVerticalScroll: false, which will specifically disable touch vertical scrolling.
@latwelve I've seen other people mention peppermint.js http://wd.dizaina.net/en/scripts/peppermint/ I'm finding the watchCSS option incredibly useful for what i'm doing though, so right now I'm hoping the feature will be addressed before I need to push into production.
edit: so I've added a workaround into flickity for this. Did it all in the packaged version flickity.pkgd.js.
In Unidragger.prototype._dragPointerDown on line 3113 I took out
var targetNodeName = event.target.nodeName;
// HACK iOS, allow clicks on buttons, inputs, and links, or children of links
var isTouchstartNode = event.type == 'touchstart' &&
( allowTouchstartNodes[ targetNodeName ] || getParentLink( event.target ) );
// do not prevent default on touchstart nodes or <select>
if ( !isTouchstartNode && targetNodeName != 'SELECT' ) {
// preventDefaultEvent( event );
}
then in Unidragger.prototype._dragPointerMove on line 3144 I replaced
if ( !this.isDragging && this.hasDragStarted( moveVector ) ) {
this._dragStart( event, pointer );
}
with
if (Math.abs(moveVector.x) > Math.abs(moveVector.y)) {
// start drag if pointer has moved far enough to start drag
if ( !this.isDragging && this.hasDragStarted( moveVector ) ) {
preventDefaultEvent( event );
this._dragStart( event, pointer );
}
}
so it will only prevent the default event if your are dragging horizonally, this does the job for me, for now very much a stop gap solution.
Thanks for the replies guys
@desandro - that was my mistake for the demo - I removed that line and it worked fine until I then added this back into my document:
html,body { width: 100%; height: 100%; margin: 0px; padding: 0px; overflow-x: hidden; }
Which then led me to trying @evoactivity fix which works a charm - many thanks
Having the same exact same issue w.vertical swipe not working -- thanks @evoactivity for the fix!
Flickity also seems very laggy on my phone now on an extremely light page.. think I'll have to try another slider for my needs for now
Flickity v1.0.1 has been released with fixes for touch scrolling. Try it out and holler if this problem persists.
Windows Phone (8.1) on the problem still exists. :sob: (latest Flickity)
me too (windows phone 8.1 + latest flickity) can't swipe verticaly
For me this only seems to occur if you're touching the previous/next arrows while scrolling.
Same issue here. Can't scroll through flickity slider
@desandro Flickity is by far the best carousel i've used and implemented on a few sites. Really top draw stuff and please keep producing quality things like this. User experience is a dying art and I love things that work how they should! However, I do have this niggling problem that when trying to scroll vertically it seems just a bit too sensitive and if not a precise vertical scroll it begins to scroll horizontally.
I'm using the latest Flickity v1.2.1 on Chrome for Android.
Many thanks!
@anthony0579 Thanks for the kind words. I'm looking to resolve this in #343 in the next version of Flickity.
@desandro This will be extremely welcomed.
We are lucky enough to have a device lab in our office and can confirm that 'flicking' past a carousel is quite the challenge.
The PR in this thread is perfect, setting the dragThreshold to just 10 proved enough for us 👍
touchVerticalScroll:false still not preventing scrolling on android 5.1 chrome latest, firefox version 2.0.5
Got a bug here where it is impossible to scroll past the first image in a slider. dragThreshold seems to work from all the others.
Hi, I had a problem with Flickity on Windows Phone device. When you have full page height carousel, it's imposible to scroll down the page.
Fixed it via CSS:
.flickity-enabled.is-draggable .flickity-viewport{
touch-action: pan-y !important;
}
This hack is for rewrite inline rule style="touch-action: none;" on this block.
Works for me. May be there is a better solution?