messere1 opened a new pull request, #1693: URL: https://github.com/apache/rocketmq-dashboard/pull/1693
## Summary - subscribe to system theme changes through MediaQueryList event listeners when available - fall back to legacy addListener/removeListener in older Safari and embedded WebViews - clean up through the same API used for subscription - cover legacy rendering, theme updates, and listener removal ## Root cause and impact ThemeProvider checked that `matchMedia` existed but assumed its result implemented EventTarget. Legacy MediaQueryList implementations expose only addListener/removeListener, causing the provider effect to throw when the application follows the system theme. Feature detection keeps modern behavior and restores compatibility. Closes #1690 ## Validation - npm test -- --run src/theme/__tests__/ThemeContext.test.tsx (9 passed) - npx eslint src/theme/ThemeProvider.tsx src/theme/__tests__/ThemeContext.test.tsx - npm run build - git diff --check -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
