[Help]: Carousel focus event not behaving as expected #1071
-
SummaryWhen I tab to focusable elements within each slide, the carousel doesn't behave as I expect. From what I understand from the docs, the default callback fires the slideFocus event and scrolls to the focused element. So does this mean Embla should automatically move to the slide with the focused element? If not, how do I began to implement this behavior? If applicable, which variants of Embla Carousel are relevant to this question?
Additional informationNo response CodeSandbox examplehttps://stackblitz.com/edit/stackblitz-starters-2xhj2u?file=app%2F_components%2FSlideshow.tsx |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@hunterbecton thanks for your question. I found the following problem in your code: You've missed to set <div className="h-full" ref={emblaRef}> {/* <-- Add overflow: hidden; here */} |
Beta Was this translation helpful? Give feedback.
@hunterbecton thanks for your question. I found the following problem in your code: You've missed to set
overflow: hidden;
on your viewport element. Maybe that's why?