-
-
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
buttons plugin : avoid multiple change event trigger #31000
Merged
XhmikosR
merged 8 commits into
twbs:v4-dev
from
Lausselloic:buttons_prevent_multiple_onchange
Oct 2, 2020
Merged
buttons plugin : avoid multiple change event trigger #31000
XhmikosR
merged 8 commits into
twbs:v4-dev
from
Lausselloic:buttons_prevent_multiple_onchange
Oct 2, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@patrickhlauke Can you have a look please? BTW I'm not sure if it's totally OK changing the public API method. Isn't there any other way? |
XhmikosR
reviewed
Jun 10, 2020
@Johann-S Any chance you could review this PR this week? Thanks! |
- 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
XhmikosR
force-pushed
the
buttons_prevent_multiple_onchange
branch
from
September 14, 2020 07:13
92f03b0
to
c3db204
Compare
Johann-S
reviewed
Sep 25, 2020
Friendly bump to @Lausselloic :). |
…NGING` on button
…NAME_CHANGING` on button" use a class variable instead This reverts commit a01b2bf. # Conflicts: # js/src/button.js
Johann-S
approved these changes
Oct 2, 2020
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.
LGTM thanks @Lausselloic 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #30924
.btn
class is always set onto the label if there's one, otherwise need to update this plugin and look for label arround the inputTest with keyboard, mouse and js clic call