question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ScrollArea] Uses feature not present in Safari 13 — browser support (general)

See original GitHub issue

We 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:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jjenzzcommented, Apr 14, 2021

I had actually suggested we create a Supports component when the ScrollArea 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 the forceNative prop so might be a good chance to revisit this Supports component discussion.

Original discussion here for reference: https://github.com/radix-ui/primitives/pull/203#discussion_r501156851

1reaction
benoitgrelardcommented, Apr 13, 2021

That’s pretty cool!

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found