Slider should function the same when inside an accordion.
...
Slider handle is offset from the slider on the initial load.
...
Not sure of a solution or exactly the cause but I suspect the slider width is some how not properly calculated when initially loading. Maybe due to the extra padding?
...
Test Case: https://codepen.io/jinch/pen/NWqwxYN?editors=1000
...
How to reproduce:
This is making it difficult for the user to consistently and accurately control. I really need to find a solution as I have a bunch of these sliders within accordions on my production site.
...
Hi @jinch,
You are using a pretty old version of Foundation Sites.
https://codepen.io/DanielRuf/pen/yLNPJQy?editors=1000
It works a bit better but in general you have to initialize the slider when the accordion is initialized or its content show.
See https://get.foundation/sites/docs/javascript.html#adding-content-to-plugins
Thanks for the reply @DanielRuf
The bug is still an issue with v6.6.1 unfortunately.
https://codepen.io/jinch/pen/jOPayNe?editors=1010
I'm confused on the link you referenced. So is adding the slider programmatically the only way to work around this? How would this be implemented?
Check https://codepen.io/DanielRuf/pen/yLNPJQy?editors=1010
But you are using the responsive-accordion-tabs component.
Ah.. your right!
I forgot I set that up as a responsive tab accordion. Thank you for the code reference and example though that didn't seem to do the trick as the issue was mostly on the initial load and not with interaction with it.
With your help though I think I managed to get it to function correctly again by applying the 'reInit' method as you correctly pointed out in your initial post - here: (https://get.foundation/sites/docs/javascript.html#adding-content-to-plugins)
This is my attempt at the work around that at first visual inspection seems to do the trick:
https://codepen.io/jinch/pen/VwLrPOX?editors=1010
Awesome. I will close the issue as this seems to be resolved now.