Closed winston0410 closed 11 months ago
Please read the conversation and this.
Hey David thanks you for your prompt reply. I have read that issue but I don't believe they are duplicate. Are you suggesting that using scrollNext
or scollPrev
is the solution here?
From what I can see, using Tab for navigation is not really the same with arrowkeys with keydown event, as we have to update after that navigation has happened, but for arrowkeys we are dealing with the event before that navigation on:keydown.
Ah sorry about that @winston0410,
I was a bit too fast there. This was the comment I wanted to share. The title of the issue doesn't seem related though so I understand why you didn't find it 😄.
Best, David
Yes indeed that is not what I would have found with out your help, thank you so much. I have tried that plugin and seems like it is working well, except the type is a little bit off now. Would you accept a PR if I fix the type for that?
@winston0410 this feature will be released with v8.0.0-rc12.
@winston0410 this feature has been released with v8.0.0-rc12.
Feature request is related to
Is your feature request related to an issue?
Right now when Tab is used to navigate, and if focusable element is located in the carousel, the slides will be navigated, but the
embla.selectedScrollSnap
is still 0.Describe the solution you'd like
Listen on:focus and set selectedScrollSnap
Describe alternatives you've considered
I have tried to use on:focus event on those focusable element, and set the index with
embla.scrollTo
. But since focus event is only firing after an element received focus(i.e navigated to a new element),embla.scrollTo
does not work well.Basically, I think we need a method that manipulate
embla.selectedScrollSnap
without actually scrolling to that slide.Additional context
Add any other context or screenshots about the feature request here.