diff options
| author | Anna <[email protected]> | 2017-04-26 19:46:05 +0300 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2017-04-26 18:46:05 +0200 |
| commit | 33715a73d2eae3865cb4c1e0a13d1da4b6aeb278 (patch) | |
| tree | 2b0b8dcdf2902e1bbf636deee69db92dec10ed8d /js/src/button.js | |
| parent | ab39defe74914109df164c823af927de68320d55 (diff) | |
| download | bootstrap-33715a73d2eae3865cb4c1e0a13d1da4b6aeb278.tar.xz bootstrap-33715a73d2eae3865cb4c1e0a13d1da4b6aeb278.zip | |
Fix Toggle buttons don't honor [disabled] or .disabled
Diffstat (limited to 'js/src/button.js')
| -rw-r--r-- | js/src/button.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/button.js b/js/src/button.js index 6295d0db0..722fd489d 100644 --- a/js/src/button.js +++ b/js/src/button.js @@ -90,6 +90,12 @@ const Button = (($) => { } if (triggerChangeEvent) { + if (input.hasAttribute('disabled') || + rootElement.hasAttribute('disabled') || + input.classList.contains('disabled') || + rootElement.classList.contains('disabled')) { + return + } input.checked = !$(this._element).hasClass(ClassName.ACTIVE) $(input).trigger('change') } |
