Giter VIP home page Giter VIP logo

Comments (6)

spluxx avatar spluxx commented on July 22, 2024 2

Hey @rcbyr

How are you expecting the attribute to be used to distinguish between a tap and a swipe? I really love the library's capabilities but this is one thing that I can't figure out here.

I really wish there's a onTap: (idx) => void similar to dragStart and dragEnd, but this is just a suggestion.

from keen-slider.

rcbyr avatar rcbyr commented on July 22, 2024 1

Hey @mtin79

I thought about your problem, and I've come to the conclusion that I have to solve this within the slider. So, thanks for pointing that out. There's a new release tomorrow. I will then provide an attribute that the slider ignores if one of its elements has it.

from keen-slider.

rcbyr avatar rcbyr commented on July 22, 2024 1

Hey @mtin79

I just released a new version. Be aware of some style changes. If you want to prevent the slider events on your elements within a slide, you can simply add the attribute data-keen-slider-pe. You can change the attribute name if needed, see the API.

from keen-slider.

gibatronic avatar gibatronic commented on July 22, 2024

Same for me, when the user clicks / taps I want to open a fullscreen gallery.
But the click event is going through after a swipe, which should have been prevented.

from keen-slider.

avinash-vllbh avatar avinash-vllbh commented on July 22, 2024

+1 to what @spluxx suggested. @rcbyr is there a way to distinguish between a tap and a drag?

from keen-slider.

GephestUA avatar GephestUA commented on July 22, 2024

If you want to prevent accidental clicks during scrolling use onMouseDown={e => e.target.setAttribute('data-keen-slider-clickable', true) } . Hang this listener on each slide.

from keen-slider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.