mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-27 23:33:58 +00:00
Fixes #2541 — Properly applies “disabled” styling and logic to flip switches, sliders, and custom selects based on disabled attribute in underlying input markup.
This commit is contained in:
parent
0f81773a42
commit
d0fc381d6b
2 changed files with 6 additions and 2 deletions
|
|
@ -122,7 +122,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
}
|
||||
|
||||
// Disable if specified
|
||||
if ( options.disabled ) {
|
||||
if ( options.disabled || this.element.attr('disabled')) {
|
||||
this.disable();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -215,7 +215,11 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|||
},
|
||||
|
||||
refresh: function( val, isfromControl, preventInputUpdate ) {
|
||||
if ( this.options.disabled ) { return; }
|
||||
|
||||
if ( this.options.disabled || this.element.attr('disabled')) {
|
||||
this.slider.addClass('ui-disabled');
|
||||
return;
|
||||
}
|
||||
|
||||
var control = this.element, percent,
|
||||
cType = control[0].nodeName.toLowerCase(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue