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
$().button('toggle') not working in 4.4.1 #30077
Comments
Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case via CodePen/JS Bin or Stackblitz and report back with your link, Bootstrap version, and specific browser and OS details. This is an automated reply |
in my project when I revert from 4.4.1 to 4.3.1 without modifying anything else it starts working |
Both demos seem to work fine? |
What I see is that in 4.4.1 demo the toggle button is not active (checked) the method is not working |
confirming that |
Does master work? /CC @Johann-S |
Ping @Johann-S ^^ |
Hi, I think the test need to be done on properties of the component and not on his attribute.
|
@XhmikosR it should be the same in master The things I can see, it's in v4.3.1 we trigger a change event and not in v4.4.1, maybe @patrickhlauke can help us to know where is the good behavior here |
i have lost track of how any of our JS work, so i'd go by actual behavior. make the actual checkbox/radio button visible in the CSS, run the button('toggle') and see if it has an actual effect... |
actually it does nothing 😟 for me it's related to this commit: 24abed1 but I don't know the correct behavior |
so i introduced the problem? gah, i absolutely detest the very existence of all that code. such a hacky construct we've been carrying around. admittedly, i haven't been able to trace the full logic of that code at the time either, it was a lot of very hacky trial and error to work around browser behaviors and bugs. can't wait for the CSS-only approach in v5... i think fundamentally the problem we're having is that browsers do most of the work by default when the |
Hi, I wanted to help on that but can't clearly identify what is a bug, I've the same result on 4.3 and 4.4 There's no need to trigger the toggle on the label itself like in the pen, the button auto-init with the
And running So I can't understand what's the error, if someone could explain to me |
the problem is: if you try to toggle programmatically with the method, it doesn't work (it's not about auto-initialising or anything...it's that at any point when you try and trigger the method, it does nothing, but it should work exactly the same way as clicking/activating with keyboard) |
…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)
Fixed in #30388 |
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 |
$().button('toggle')
not working in 4.4.1, but working fine in 4.3.1
4.4.1 https://codepen.io/DK568/pen/MWYxWMO
4.3.1 https://codepen.io/DK568/pen/ExaMaxd
the difference is that button is not checked by jquery
The text was updated successfully, but these errors were encountered: