Comments (7)
Oh yeah, something like watchFocus
would be beneficial. Thanks a lot for coming up with a fix. I'll just go with the hacky solution for now but happy to help if you'd need me to test anything.
from embla-carousel.
Thanks @jasonk16. It would definitely help if you wouldn’t mind testing as soon as I have a draft ready. I’ll let you know when I have something 👍🏻.
from embla-carousel.
Hi @jasonk16,
Thanks for your bug report. Have you seen the example in the docs? Can you reproduce it there? If no, please check how to work with the plugin there.
Best,
David
from embla-carousel.
Thanks for your quick reply @davidjerleke. I've reproduced the jumpyness based on the example here, I've just changed the individual items to suit my needs, which is an image container.
from embla-carousel.
@jasonk16 thanks! I'll investigate what's going on when possible.
This might be related to anchor tags being elements that can receive focus. If my assumption is correct, the carousel jumps to the slide that is active when the focus event is triggered from a click.
Best,
David
from embla-carousel.
Your assumption is correct. I've just tried removing the anchor tags from the cards and it does not jump anymore. Perhaps I could use onClick
on divs as a workaround temporarily, but long term I guess its not a good html semantics if those cards are links.
I also tried nesting the anchor tag within the div but I guess the focus still triggers on click. Let me know if theres anything you'd need my help on. Thanks again!
from embla-carousel.
Perhaps I could use onClick on divs as a workaround temporarily, but long term I guess it's not a good html semantics if those cards are links.
@jasonk16 you're right about that. It's not good semantics so a solution for this is needed. I'm working on a new option called watchFocus
which will enable you to either disable/enable the auto focus feature with a boolean
. Alternatively, you will be able to pass your own callback to control when Embla should focus or not: Similar to watchDrag
, watchResize
and watchSlides
.
Unfortunately, until then, you'll have to stick with the hacky solution you mentioned.
Best,
David
from embla-carousel.
Related Issues (20)
- [Bug]: no specific name for plugin import, have to use "index" instead HOT 4
- [Bug]: Embla Carousel's animation becomes less smooth when the battery saving mode is enabled. HOT 1
- [Bug]: Render when slides are wider than view size HOT 5
- [Bug]: When using the wheel gesture to swipe the carousel, for the first slide and the last slide, there are excessive blank space. HOT 2
- [Bug]: Thumbnails example won't work in RTL HOT 2
- [Bug]: Height is getting set to 0 HOT 4
- [Bug]: Scroll broken after direction update HOT 15
- [Bug]: Jest testing bug return TypeError: undefined is not a function HOT 2
- [Bug]: Bad scroll progress reporting when loop = true HOT 1
- [Bug]: beforeUnmount destroys too soon during Vue transitions HOT 10
- [Bug]: Fade example missing dependency and missing vanilla examples HOT 10
- [Bug]: Image disperses after window resize HOT 1
- [Bug]: Fade plugin has wrong peer dependency version
- [Bug]: any type for `Autoplay` plugin options HOT 5
- [Bug]: iOS Stutter HOT 5
- [Bug]: Video with controls in slide interferes with swiping HOT 1
- [Bug]: Trailing spaces HOT 1
- [Bug]: verticle view slider - last slider is not appearing above first slider by default HOT 2
- [Bug]: Offset by 1 issue for canScrollNext when tab size has fractional width HOT 2
- [Bug]: Cannot access AutoScroll plugin Type HOT 1
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 embla-carousel.