mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-08 22:56:46 +02:00
Button toggling - trigger change event on input
Bootstrap’s .button styles can be applied to other elements, such as labels, to provide checkbox or radio style button toggling. When the checkbox or radio state is changed, there should be triggered the change event. Currently, the change event is triggered on the Button, which is not correct. Only input fields do support the change event.
This commit is contained in:
@@ -90,7 +90,7 @@ const Button = (($) => {
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
input.checked = !$(this._element).hasClass(ClassName.ACTIVE)
|
||||
$(this._element).trigger('change')
|
||||
$(input).trigger('change')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user