Focus center with trimspace false not working correctly when showing slider on click #1284
Open
2 tasks done
Labels
bug
Something isn't working
Checks
Version
v4.1.4
Description
Hello,
I'm working on a feature where a slider opens within a modal upon clicking. This modal is configured with the trimspace option set to false and focus centered. I've noticed that when the slider isn't present on the initial page load, the translateX values for splide__list don't get calculated correctly.
I understand that I could circumvent this issue by using a custom modal, but I'd prefer to utilize the native dialog element, which doesn't allow for this workaround.
Interestingly, when I resize the window, an event listener triggers and everything functions as expected. Is there something I can trigger when opening the modal as a quick fix? Alternatively, could you investigate this issue and provide a solution?
Reproduction Link
https://codepen.io/samuelreichor/pen/KKYpzBx
Steps to Reproduce
Expected Behaviour
The translatex should get calculated correctly.
The text was updated successfully, but these errors were encountered: