freqdec / fd-slider

An Unobtrusive Accessible Slider script that can also be used as an HTML5 Input Range polyfill solution
Other
264 stars 55 forks source link

Slider breaks if hidden if Scale is used (even if updateSlider is called on unhide) #31

Open EnigmaSolved opened 12 years ago

EnigmaSolved commented 12 years ago

This is not an urgent issue for me as I don't have to use the scale option, but figured I'd post about it in case others run across it.

I have sliders that are hidden during creation, and thus when I unhide them I call updateSlider for each. I was also using the scale option (set to 50:#, where # varied for each slider). Some sliders would not be able to move at all (they'd have a range width of 1px), while others would only be movable from 50% and up. A few worked just fine. I suspect the issue might have to do with what values were being used for the 50% scale, but as using the scale option is not critical for my application (at least as far as I can tell at the moment) I haven't done further testing. Removing the scale option from the createSlider call appears to fix things.

I hope this will be helpful to others. :)

freqdec commented 11 years ago

Hi, Can you give me the min, max, step and scale values of a slider that didn't work (and the browser you were using if possible) to enable me to test further?

EnigmaSolved commented 11 years ago

It looks like I was using the following:

The scale midpoint and max were varied, so I'd have to do some hunting to try to narrow down which ones were the problem. The following are the list of max numbers used (I'll try to remove duplicates). The scale midpoint was calculated by rounding 50% of the max to a whole number. 26 20 29 39 36 45 23 47 17 31 30 38 25 19 18 16 15 24 28 53 74 44 99 63 37 50 65 73 40 39 29 35 26 13 12

I use Firefox on Windows 7. Firefox version would have been whatever was current a few months ago (something between 14 and 16 I'm guessing, since 17 just came out).

I hope this helps! If I can make time to do some further testing I'll let you know anything else I find.

adatta02 commented 11 years ago

I had the same issue using the fd-slider as a HTML5 shim. See http://twitlabs.net/fd-slider/ for an example

What worked for me was calling fdSlider.redrawAll(); after the container which has the slider in it became visible.