@@ -148,7 +148,10 @@ $.widget( "mobile.textinput", $.mobile.widget, {
148148
149149 disable : function ( ) {
150150 var $el ,
151- parentNeedsDisabled = this . element . attr ( "disabled" , true ) && ( this . element . is ( "[type='search'], :jqmData(type='search')" ) || ( this . element . is ( "[type='text'],textarea" ) && ! ! this . options . clearBtn ) ) ;
151+ isSearch = this . element . is ( "[type='search'], :jqmData(type='search')" ) ,
152+ inputNeedsWrap = this . element . is ( "input" ) && ! this . element . is ( ":jqmData(type='range')" ) ,
153+ parentNeedsDisabled = this . element . attr ( "disabled" , true ) && ( inputNeedsWrap || isSearch ) ;
154+
152155 if ( parentNeedsDisabled ) {
153156 $el = this . element . parent ( ) ;
154157 } else {
@@ -160,9 +163,10 @@ $.widget( "mobile.textinput", $.mobile.widget, {
160163
161164 enable : function ( ) {
162165 var $el ,
163- parentNeedsDisabled = this . element . attr ( "disabled" , true ) && ( this . element . is ( "[type='search'], :jqmData(type='search')" ) || ( this . element . is ( "[type='text'],textarea" ) && ! ! this . options . clearBtn ) ) ;
166+ isSearch = this . element . is ( "[type='search'], :jqmData(type='search')" ) ,
167+ inputNeedsWrap = this . element . is ( "input" ) && ! this . element . is ( ":jqmData(type='range')" ) ,
168+ parentNeedsDisabled = this . element . attr ( "disabled" , true ) && ( inputNeedsWrap || isSearch ) ;
164169
165- // TODO using more than one line of code is acceptable ;)
166170 if ( parentNeedsDisabled ) {
167171 $el = this . element . parent ( ) ;
168172 } else {
0 commit comments