Created by: Lausselloic
Fixes https://github.com/twbs/bootstrap/issues/30924
- add unit test to count how many event are thrown when widget contains multiple tags inside label
- add a parameter to toggle, if click event is provided onto an input then don't trigger another change event already thrown by the browser
- simplify the case where toggle interface is called click provide from input itself OR it's a button without label. If label is present, then browser propagate clic event from childrens thru label and then cause multiple calls to toggle
- the test assume that
.btn
class is always set onto the label if there's one, otherwise need to update this plugin and look for label arround the input
Test with keyboard, mouse and js clic call