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

Commit c67a608

Browse files
author
Alexander Schmitz
committed
Slider: actually include disabled changes mentioned previous commit
1 parent 125f95d commit c67a608

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

js/widgets/forms/slider.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
7979
max: max,
8080
min: min,
8181
valuebg: valuebg,
82+
isRangeslider: isRangeslider,
8283
dragging: false,
8384
beforeStart: null,
8485
userModified: false,
@@ -491,13 +492,17 @@ $.widget( "mobile.slider", $.mobile.widget, {
491492

492493
enable: function() {
493494
this.element.attr( "disabled", false );
494-
this.slider.removeClass( "ui-disabled" ).attr( "aria-disabled", false );
495+
this.slider.removeClass( "ui-disabled" ).attr( "aria-disabled", false ).parent().removeClass( "ui-disabled" );
495496
return this._setOption( "disabled", false );
496497
},
497498

498499
disable: function() {
499500
this.element.attr( "disabled", true );
500-
this.slider.addClass( "ui-disabled" ).attr( "aria-disabled", true );
501+
if( this.isRangeslider ) {
502+
this.slider.attr( "aria-disabled", true ).parent().addClass( "ui-disabled" );
503+
} else {
504+
this.slider.addClass( "ui-disabled" ).attr( "aria-disabled", true );
505+
}
501506
return this._setOption( "disabled", true );
502507
}
503508

0 commit comments

Comments
 (0)