-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable button toggle on label when checkbox is inside #30388
Conversation
…nside label add unit test to avoid further errors Need to check on V5 without Jquery button plugin have the previous bug (checked state not change)
@patrickhlauke is there a version of your code on the v5? or do I need to make a dedicated PR with your fix and this one? |
I don't think we landed the PR that introduced the issue in master, IIRC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in Chrome, Firefox, IE11 with mouse/keyboard/triggering the toggle method programmatically. indeed, this seems to work well.
@Johann-S LGTY? |
Possible regression in #30849? |
Seems like it. @Lausselloic can you have a look please and CC me? This will probably need to PRs one if the issue is present in master too. |
@Lausselloic friendly ping :) |
Sorry I've miss the ping. Yes it's due to that PR. I will give a try to fix it. |
@XhmikosR I've update the solution. Instead of stopping the event propagation if event is fired on checkbox inside the label, I detect if the event is not on this element before firing the toggle. Tests are okay for I'll let js team check that don't break other stuff but looks better for me |
fix #30077 for V4 $().button('toggle') not working for checkbox inside label
I' tried with mouse, keyboard and jquery call on label and also click on input
add unit test to avoid further errors
Need to check on V5 without Jquery button plugin have the previous bug (checked state not change)