Permalink
Browse files

Slider: input does not get ui-state-disabled class

Fixes gh-7024
Fixes gh-6532
Closes gh-7617

(cherry picked from commit 61bdcd7)
  • Loading branch information...
cgack authored and arschmitz committed Aug 10, 2014
1 parent 5e1a940 commit 31c0b2a346b0dd0462d821a7cec67bbfd96bef6c
Showing with 15 additions and 0 deletions.
  1. +2 −0 js/widgets/forms/slider.js
  2. +4 −0 tests/unit/slider/index.html
  3. +9 −0 tests/unit/slider/slider_core.js
@@ -585,6 +585,8 @@ $.widget( "mobile.slider", $.extend( {
this.slider
.toggleClass( "ui-state-disabled", value )
.attr( "aria-disabled", value );
this.element.toggleClass( "ui-state-disabled", value );
}
}, $.mobile.behaviors.formReset ) );
@@ -128,6 +128,10 @@
<input type="range" name="tooltip-test-both" id="tooltip-test-both" value="17" min="0" max="100" data-nstest-popup-enabled="true" data-nstest-show-value="true"/>
</label>
<label>Input slider:
<input type="range" name="disable-input-test" id="disable-input-test" value="17" min="0" max="100" />
</label>
</div>
<div id="enhancetest">
@@ -114,4 +114,13 @@
ok( slider.val() === sliderHandle.text(), "slider text should match handle text");
});
test( "slider input is disabled correctly", function() {
var slider = $( "#disable-input-test" );
slider.slider( "disable" );
ok( slider.hasClass( "ui-state-disabled" ), "disabling slider also disables the input" );
});
})( jQuery );

0 comments on commit 31c0b2a

Please sign in to comment.