Slider breaks if parent block is hidden during creation #20

Noino opened this Issue Apr 5, 2012 · 3 comments


None yet

2 participants

Noino commented Apr 5, 2012

The parent block is hidden during creation, and the slider when shown, gets stuck at the 0 position, but value is set to about half to max of whats possible when you try to move it. Resizing browser window seems to repair the slider, nob moves to its correct position and you are once again able to change the value.


  • Relevant for (atleast): FF 11, Chrome 18, Opera 11.62

IE8 seems to handle this without problems tho

@Noino Noino closed this Apr 5, 2012
@Noino Noino reopened this Apr 5, 2012
freqdec commented Apr 10, 2012

The slider needs to know it's width/height in order to calculate the pixel increment. Hidden sliders return a zero value which makes things break (but apparently not in IE8 - how strange).

You can always call the updateSlider method whenever the parent has been shown. This will recalculate the increment and make the slider work as expected.

@freqdec freqdec closed this Apr 10, 2012
Noino commented Apr 16, 2012

updateSlider doesnt seem to fix it, and while redrawAll seems to fix this one it does not look foolproof either.

Don't like the idea of redrawing all sliders each time one is shown but i guess that's where we're at atm

freqdec commented Apr 21, 2012

Just fixed the problem. I forgot to call the sliders redraw method from within the fdSlider.updateSlider method. Silly me.

Thanks for taking the time to post the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment