Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Issue when the rangeslider(v2.3.0) is hidden and resized #380

Open
nick-mok opened this issue Feb 22, 2024 · 0 comments
Open

Issue when the rangeslider(v2.3.0) is hidden and resized #380

nick-mok opened this issue Feb 22, 2024 · 0 comments

Comments

@nick-mok
Copy link

nick-mok commented Feb 22, 2024

Hi there,

I am currently working on a project which initialises the rangeslider, then hides it (with display none), and then is animated back onto the screen. It appears if the dynamically created slider is hidden and resized, it causes the value to be lost / changed.

You can reproduce the issue by visiting the tester/demo site: rangeslider.js.org and opening inspect, setting the dynamically created rangeslider to "display: none;". Now, resize the screen and you'll see that the output will jump between the min and max. This is also true if you un-hide the native slider. The original value is lost.

To fix this ourselves (I am hosting v2.3.0) you can add this condition to the original resize function (which invokes the rangeslider update function):
image

Cheers.

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

No branches or pull requests

1 participant