Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EnigmaSolved opened this issue Oct 3, 2012 · 3 comments

Comments

@EnigmaSolved
Copy link

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
Copy link
Owner

freqdec commented Dec 6, 2012

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
Copy link
Author

It looks like I was using the following:

  • step:1
  • maxStep:5
  • min:0
  • scale 50%

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants