Skip to content
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

Switch button firing change event 3 times in BS 4.5.0 #30924

Closed
dkwebtec opened this issue May 29, 2020 · 9 comments
Closed

Switch button firing change event 3 times in BS 4.5.0 #30924

dkwebtec opened this issue May 29, 2020 · 9 comments
Projects

Comments

@dkwebtec
Copy link

I have tried this issue under version 4.5.0 and the method seems working but the change event is fired 3 times on each button click

https://codepen.io/DK568/pen/MWYxWMO

try to click the button

Originally posted by @dkwebtec in #30077 (comment)

@XhmikosR
Copy link
Member

/CC @Lausselloic since it's your patch :)

@XhmikosR XhmikosR added this to Inbox in v5 via automation Jun 9, 2020
@XhmikosR XhmikosR added this to Inbox in v4.5.1 via automation Jun 9, 2020
@XhmikosR
Copy link
Member

XhmikosR commented Jun 9, 2020

@Lausselloic is this the same issue as #30849?

@Lausselloic
Copy link
Contributor

it's not the same issue but yes event is propagate to childrens inside the label. I could give a try to handle that

@XhmikosR
Copy link
Member

@Lausselloic please do so, thanks!

@mdo mdo removed this from Inbox in v5 Jun 15, 2020
@mdo mdo added this to Inbox in v5.0.0-alpha2 via automation Jun 15, 2020
@mdo
Copy link
Member

mdo commented Aug 3, 2020

#31000 targets v4-dev, but what about this change in v5?

@mdo mdo added this to To do in v4.5.3 via automation Aug 4, 2020
@mdo mdo removed this from Inbox in v4.5.1 Aug 4, 2020
@XhmikosR XhmikosR removed this from Inbox in v5.0.0-alpha2 Sep 16, 2020
@XhmikosR
Copy link
Member

@Lausselloic can you confirm please that this issue does not affect v5? I believe we removed most of the Button JS so this doesn't seem to apply to v5.

@Lausselloic
Copy link
Contributor

Lausselloic commented Oct 1, 2020

Sorry for the late reply, that doesn't affect v5 at time, there's a need to backport @patrickhlauke fixes (#28952 and #28834) those accessibility fixes are not present's in v5 I will give a try to port it.

[UPDATE]
But following @MartijnCuppens commit (1a0a085) looks like there's no more js needed in v5.

Looks like V5 version is usable with keyboard successfuly https://v5.getbootstrap.com/docs/5.0/forms/checks-radios/#toggle-buttons and using label with for attribute instead of input inside the label will prevent multiple events

@MartijnCuppens
Copy link
Member

Yup, the v5 implementation is just superb 😛

@XhmikosR
Copy link
Member

XhmikosR commented Oct 2, 2020

Fixed by #31000, thanks @Lausselloic!

@XhmikosR XhmikosR closed this as completed Oct 2, 2020
@XhmikosR XhmikosR moved this from To do to Shipped in v4.5.3 Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v4.5.3
Shipped
Development

No branches or pull requests

5 participants