metafizzy / flickity-docs

:memo: documentation for Flickity
28 stars 8 forks source link

Prevent dragging on block element with overflow: scroll; #6

Closed srosenbrand closed 9 years ago

srosenbrand commented 9 years ago

I'm using an overflow: scroll div in a gallery-cell which works great in browser mode, but not on iOS/touch devices because of draggable: true. I do need dragging on the flickity container though...

Is there a way to prevent dragging on pointerDown, but only on my scrollable div (let's say it has a class="noDrag")?

Please help, i'm on a tight schedule and need this fixed asap.. Thanks in advance!

desandro commented 9 years ago

Sorry, Flickity does not support enabling vertical scrolling within cells for touch devices. This is user experience issue. Adding a vertical scroll within the horizontal scroll of the Flickity gallery is dangerous. Users could vertically scroll the gallery in the page, but then not be able to scroll out of the gallery area.

srosenbrand commented 9 years ago

Ok thank you for your rapid reply.

kimblim commented 9 years ago

@srosenbrand Did you find a solution to your issue — we are currently experiencing the same.

@desandro Would it be possible to enable vertical scrolling on child elements of the cell, so it would be possible to have a content area with a fixed height within the cell, that would be scrollable?

jared-94 commented 6 years ago

Same problem here. Please could you provide this possibility?

Thanks

desandro commented 6 years ago

I did create a side vertical navigation with the Flickity API. See demo https://codepen.io/desandro/pen/dMjbjR

From https://github.com/metafizzy/flickity/issues/36#issuecomment-212905712

Straight up: Flickity will never support vertical scrolling. It's too much code for too little benefit. Features like vertical thumbnail navigation do not have to be built into Flickity directly. You can leverage Flickity's well documented API and many demos to create these kind of add-on features.