messere1 opened a new issue, #1690:
URL: https://github.com/apache/rocketmq-dashboard/issues/1690

   ### Description
   `ThemeProvider` supports a missing `window.matchMedia`, but when it exists 
the provider unconditionally calls `MediaQueryList.addEventListener` and 
`removeEventListener`.
   
   Older Safari versions and embedded WebViews expose the legacy `addListener` 
/ `removeListener` API without the EventTarget methods. In those environments, 
opening RocketMQ Studio with no stored manual theme throws during the provider 
effect and can break application rendering.
   
   ### Expected behavior
   System-theme following should subscribe through the modern change event API 
when available and fall back to the legacy listener API otherwise. Cleanup 
should use the matching removal method.
   
   ### Actual behavior
   A legacy-only MediaQueryList causes `addEventListener is not a function`.
   
   ### Proposed fix
   Feature-detect the MediaQueryList event methods, add a legacy fallback, and 
cover initial rendering, change notification, and listener cleanup with a 
regression test.


-- 
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]

Reply via email to