microsoft / tabster

Web Application Keyboard Navigation Tools
https://tabster.io
MIT License
118 stars 36 forks source link

fix: use FakeWeakRef when WeakRef is unavailable #301

Closed cjsheets closed 11 months ago

cjsheets commented 1 year ago

FakeWeakRef is a useful construct for clients that lack WeakRef support. In particular, there are still many Android devices that don't have WeakRef available.

This change adds FakeWeakRef fallback to Restorer and Modalizer.

ling1726 commented 1 year ago

What browsers and versions are you targeting on android? We follow the Fluent UI browser support matrix https://react.fluentui.dev/?path=/docs/concepts-developer-browser-support-matrix--page.

From MDN I can see that WeakRef should be available on supported browsers

cjsheets commented 11 months ago

I see, that makes sense. We support the last 4 major Android versions and 2 major iOS versions.

From what we've seen WeakRef support is present in Android browser versions >=84, consistent with the support matrix you linked to. Since 4 versions ago was Android 11 and Chrome 84 was released before Android 11, it sounds like our supported devices are in alignment.