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: Input not enable after disabled programmatically #7024

Closed
andersonrocha opened this Issue Jan 30, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@andersonrocha

andersonrocha commented Jan 30, 2014

To programmatically disable a slider, the input is disabled, but enable it, your input is not enabled.

$("#test-slider").slider("disable");
$("#test-slider").slider("enable");

Using:
jQuery Mobile 1.4.0
jQuery 1.10.2

@cgack

This comment has been minimized.

Show comment
Hide comment
@cgack

cgack Mar 14, 2014

Contributor

I was unable to reproduce this in both the current master and 1.4.0:

http://jsbin.com/IFolanOW/349/edit
http://jsbin.com/IFolanOW/352/edit

Contributor

cgack commented Mar 14, 2014

I was unable to reproduce this in both the current master and 1.4.0:

http://jsbin.com/IFolanOW/349/edit
http://jsbin.com/IFolanOW/352/edit

@andersonrocha

This comment has been minimized.

Show comment
Hide comment
@andersonrocha

andersonrocha Mar 17, 2014

Sorry, I reported the wrong error. Actually the problem is that when you disable the slider, the input is not getting disabled style.
What I did to solve the problem was to add the Slider widget _setDisabled function of this line:
this.element.toggleClass ("ui-state-disabled", value);

I do not know if this would be the correct behavior you expect the widget.

andersonrocha commented Mar 17, 2014

Sorry, I reported the wrong error. Actually the problem is that when you disable the slider, the input is not getting disabled style.
What I did to solve the problem was to add the Slider widget _setDisabled function of this line:
this.element.toggleClass ("ui-state-disabled", value);

I do not know if this would be the correct behavior you expect the widget.

@cgack

This comment has been minimized.

Show comment
Hide comment
@cgack

cgack Mar 17, 2014

Contributor

I would think updating the input to have the ui-state-disabled class would be desired here. @arschmitz can you confirm or let us know why we would want to leave the input different from the slider?

Contributor

cgack commented Mar 17, 2014

I would think updating the input to have the ui-state-disabled class would be desired here. @arschmitz can you confirm or let us know why we would want to leave the input different from the slider?

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Mar 17, 2014

Member

This is a bug. it should be disabled here see http://demos.jquerymobile.com/1.4.2/slider/#Disabled

Member

arschmitz commented Mar 17, 2014

This is a bug. it should be disabled here see http://demos.jquerymobile.com/1.4.2/slider/#Disabled

cgack added a commit to cgack/jquery-mobile that referenced this issue Mar 17, 2014

cgack added a commit to cgack/jquery-mobile that referenced this issue Mar 17, 2014

cgack added a commit to cgack/jquery-mobile that referenced this issue Mar 20, 2014

cgack added a commit to cgack/jquery-mobile that referenced this issue Apr 24, 2014

cgack added a commit to cgack/jquery-mobile that referenced this issue May 29, 2014

cgack added a commit to cgack/jquery-mobile that referenced this issue Jul 10, 2014

cgack added a commit to cgack/jquery-mobile that referenced this issue Aug 10, 2014

@arschmitz arschmitz closed this in 61bdcd7 Aug 16, 2014

arschmitz added a commit that referenced this issue Aug 26, 2014

agcolom added a commit to agcolom/jquery-mobile that referenced this issue Nov 26, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment