[ScrollArea] Uses feature not present in Safari 13 — browser support (general)
See original GitHub issueWe have had reports of the documentation website breaking (because we use ScrollArea for the nav and other).
ScrollArea
uses the media query list change event which isn’t supported in Safari 13.
export function onPrefersReducedMotionChange(
callback: (prefers: boolean) => any,
globalWindow: Window & typeof globalThis = window
) {
try {
const mediaQueryList = globalWindow.matchMedia(QUERY);
mediaQueryList.addEventListener('change', listener);
return function () {
mediaQueryList.removeEventListener('change', listener);
};
} catch (e) {}
return function () {};
function listener(event: MediaQueryListEvent) {
callback(!event.matches);
}
}
Generally, we need to address how we’re going to deal with the fact we don’t include polyfills. What should the experience be, etc.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Use the developer tools in the Develop menu in Safari on Mac
If you're a web developer, the Safari Develop menu provides tools you can use to make sure your website works well with all...
Read more >Intersection Observer API - MDN Web Docs
The Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor ...
Read more >"scroll-behavior" | Can I use... Support tables for ... - CanIUse
1 Safari does not have support for the smooth scroll behavior. Support data for this feature provided by: MDN browser-compat-data. Show summary
Read more >Is there a way to apply styles to Safari only? - Stack Overflow
Safari 9 now includes feature detection so we can use that now. ... Chrome 29+ */ @supports (-webkit-appearance:none) and (not (overflow:-webkit-marquee)) ...
Read more >Safari not supported… | WordPress.org
I suspect the problem recently is that we upgraded a third party library that uses a feature not supported by Safari 13 and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had actually suggested we create a
Supports
component when theScrollArea
was originally created that would use error boundaries to do something exactly like that 🙂@benoitgrelard The new version of the
ScrollArea
I am working on will not have theforceNative
prop so might be a good chance to revisit thisSupports
component discussion.Original discussion here for reference: https://github.com/radix-ui/primitives/pull/203#discussion_r501156851
That’s pretty cool!