Skip to content
Discussion options

You must be logged in to vote

Update 3:

Found a way to fix this for firefox too. I still have no idea why Bootstrap v5 causes this problem, but in case someone stumbles upon the same problem, here's the solution:

When clicking on a switch, the backend receives the new value, thus updating the frontend, and the focus remains on said switch. This is what causes the crazy scrolling you see in the GIF, and also why manually changing the toggle value from the backend doesn't cause this problem.

To fix this, trigger the callback that updates the data upon onBlur event, instead of onChange, and make onChange trigger onBlur. This would have been obvious in case of an input field, but not so obvious for a toggle / checkbox / r…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wtfzambo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant