Browse Source

Fixes issue with checkbox onEnable/disable callback mispelling

pull/4046/head
Jack Lukic 8 years ago
parent
commit
ed98c55e84
2 changed files with 9 additions and 0 deletions
  1. 1
      RELEASE-NOTES.md
  2. 8
      src/definitions/modules/checkbox.js

1
RELEASE-NOTES.md

@ -47,6 +47,7 @@
- **Button** - Fixed issue where `disabled loading button` would not remove `pointer-events` #2933
- **Button/Dropdown** - Button dropdowns using `default text` no longer receive incorrect font styling for placeholder text
- **Checkbox** - Radio buttons received `indeterminate` styles when user has not yet interacted with the page in Chrome
- **Checkbox** - Fixed issue where docs refer to `onEnable` and `onDisable` with checkbox but callback was called `onEnabled` and `onDisabled`, both callbacks will now be valid until 3.0 #3761 #3763
- **Dropdown** - Dropdowns no longer re-open on selection when nested inside of a `<label>` #3917
- **Dropdown** - Fixed bug where using `action: 'hide'` could cause `text` value not to be passed to `onChange` callback
- **Dropdown** - Regenerated dropdown will no longer ignore `disabled` property #4010 **Thanks @eymengunay!**

8
src/definitions/modules/checkbox.js

@ -275,6 +275,8 @@ $.fn.checkbox = function(parameters) {
}
module.debug('Enabling checkbox');
module.set.enabled();
settings.onEnable.call(input);
// preserve legacy callbacks
settings.onEnabled.call(input);
},
@ -285,6 +287,8 @@ $.fn.checkbox = function(parameters) {
}
module.debug('Disabling checkbox');
module.set.disabled();
settings.onDisable.call(input);
// preserve legacy callbacks
settings.onDisabled.call(input);
},
@ -799,6 +803,10 @@ $.fn.checkbox.settings = {
onEnable : function(){},
onDisable : function(){},
// preserve mispelled callbacks (will be removed in 3.0)
onEnabled : function(){},
onDisabled : function(){},
className : {
checked : 'checked',
indeterminate : 'indeterminate',

Loading…
Cancel
Save