@@ -150,7 +150,9 @@ $.widget( "mobile.slider", $.mobile.widget, {
150150
151151 // prevent screen drag when slider activated
152152 $ ( document ) . bind ( "vmousemove" , function ( event ) {
153- if ( self . dragging ) {
153+ // NOTE: we don't do this in refresh because we still want to
154+ // support programmatic alteration of disabled inputs
155+ if ( self . dragging && ! self . options . disabled ) {
154156 // self.mouseMoved must be updated before refresh() because it will be used in the control "change" event
155157 self . mouseMoved = true ;
156158
@@ -168,6 +170,12 @@ $.widget( "mobile.slider", $.mobile.widget, {
168170 } ) ;
169171
170172 slider . bind ( "vmousedown" , function ( event ) {
173+ // NOTE: we don't do this in refresh because we still want to
174+ // support programmatic alteration of disabled inputs
175+ if ( self . options . disabled ) {
176+ return false ;
177+ }
178+
171179 self . dragging = true ;
172180 self . userModified = false ;
173181 self . mouseMoved = false ;
@@ -299,6 +307,8 @@ $.widget( "mobile.slider", $.mobile.widget, {
299307
300308 refresh : function ( val , isfromControl , preventInputUpdate ) {
301309
310+ // NOTE: we don't return here because we want to support programmatic
311+ // alteration of the input value, which should still update the slider
302312 if ( this . options . disabled || this . element . attr ( 'disabled' ) ) {
303313 this . disable ( ) ;
304314 }
0 commit comments