Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

enabling slider causes it to toggle disabled #6857

Closed
jayenashar opened this issue Dec 28, 2013 · 3 comments
Closed

enabling slider causes it to toggle disabled #6857

jayenashar opened this issue Dec 28, 2013 · 3 comments
Assignees
Milestone

Comments

@jayenashar
Copy link

i'm new to js, so please be kind if i'm doing something wrong, but both of these seem to toggle disabled instead of setting it to false:

        $("#slider-distance").slider("enable");
        $("#slider-distance").slider("option", "disabled", false);

I believe the issue is here: https://github.com/jquery/jquery-mobile/blob/1.4.0/js/widgets/forms/slider.js#L584 where value is not passed to toggleClass

@arschmitz
Copy link
Contributor

Thank you for submitting this issue please see our contributing guidelines https://github.com/jquery/jquery-mobile/blob/master/CONTRIBUTING.md and create a jsbin test page illustrating the issue. For now i'm going to close this as incomplete but will reopen when more information is provided.

@jayenashar
Copy link
Author

Issue description

toggle disabled instead of setting it to false:

    $("#slider-distance").slider("enable");
    $("#slider-distance").slider("option", "disabled", false);

Test page

http://jsbin.com/IFolanOW/33/edit

Steps to reproduce

Create a disabled slider.
Enable it multiple times.

Expected outcome

It is enabled and stays enabled.

Actual outcome

Disabled is toggled.

Platforms/browsers (including version) and devices tested

Firefox 26 on Debian Jessie

jQuery Mobile and jQuery core version used

1.4.0 & 1.9.1

Other relevant information, e.g. using PhoneGap

JQuery Mobile is cool!

@arschmitz
Copy link
Contributor

@jayenashar Thank you very much it indeed looks like there is a problem here. im going to reopen this. it looks like your first assessment of where the problem is is correct.

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