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

Color Mode Toggle Example Works Only in Firefox, Not in Chrome or Edge #571

Closed
Tirthagit opened this issue Mar 18, 2025 · 1 comment · Fixed by #576
Closed

Color Mode Toggle Example Works Only in Firefox, Not in Chrome or Edge #571

Tirthagit opened this issue Mar 18, 2025 · 1 comment · Fixed by #576
Labels
bug Something isn't working

Comments

@Tirthagit
Copy link

Description:
The Color Mode toggle example works correctly in Firefox but does not function as expected in Google Chrome or Microsoft Edge. When clicking the toggle button, the mode does not change in these browsers. I inspected the console in both Edge and Chrome but no errors were shown on clicking on the toggle button.

Steps to Reproduce:

  • Open the Bootstrap Color Mode Toggle Example.
  • Open it in Firefox → The toggle works correctly.
  • Open the same example in Google Chrome or Microsoft Edge → The toggle does not change the color mode.

Expected Behavior:
The color mode toggle should work consistently across all modern browsers, including Chrome and Edge.

Actual Behavior:
✅ Firefox: The toggle works correctly.
❌ Chrome & Edge: Clicking the toggle icon does not switch the mode.

Environment Details:
Bootstrap Version: (e.g., 5.3.3)
Operating System: Windows 10

Browser Versions:
Firefox: 134.0.3124.72 ✅ Works
Chrome: 134.0.6998.89 ❌ Not working
Edge: 134.0.3124.72 ❌ Not working
Image
Suggested Labels: bug, browser-compatibility, help wanted

@julien-deramond
Copy link
Member

Thanks for reporting this issue @Tirthagit. I've provided a fix in #576. In the meantime, you can apply it in your project like this: https://github.com/twbs/examples/pull/576/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants