Skip to content

Conversation

@DhirajTsx
Copy link

Firefox compatibility fix for AnimatedThemeToggler

Problem

Firefox does not support the View Transitions API (document.startViewTransition),
which causes the Animated Theme Toggler to throw a runtime error and stop working.

Solution

This PR adds safe feature detection and a graceful fallback:

  • Uses the animated transition when startViewTransition is available
  • Falls back to an instant theme toggle on unsupported browsers (e.g. Firefox)
  • Prevents crashes while preserving functionality

Result

  • Chrome and supported browsers keep the animation
  • Firefox and other unsupported browsers work without errors
  • Improved cross-browser reliability

@vercel
Copy link

vercel bot commented Jan 17, 2026

@DhirajTsx is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant