Comments (6)
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.
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.
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.
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.
+1 to what @spluxx suggested. @rcbyr is there a way to distinguish between a tap and a drag?
from keen-slider.
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)
- scrolling issue on mobile with scroll variant of "data-keen-slider-scrollable".
- SyntaxError: Named export 'useKeenSlider' not found.
- [Angular] ReferenceError: document is not defined
- Keen-slider doesn't work properly with vue-transition.
- Slider Switches Slide After Very Short Drag
- Click while sliding with free-snap mode HOT 1
- [VanillaJS][v5] translate3d values for slides are sometimes wrong
- How to avoid skipping slides when mouse scrolling? HOT 1
- moveToIdx does not work in certain conditions HOT 3
- Dynamic content makes slides jumping between loops
- Scrolling to a Specific Element in a Multi-Element Slide
- Weird Resize Happening to All Slides HOT 1
- Control end animation speed
- Autosroll issue
- Please update documentation
- Mobile URL bar resizing causes autoplaying carousel jump to the edge of a slide on initial scroll
- Gutenberg Block: TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
- Carousel card effect
- Any way to stop or pause autoplay?
- Unable to click inside slide item
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keen-slider.