Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

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

@nick-mok

Description

@nick-mok

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions