Skip to content

fix: ios platform user agents#10312

Open
nwidynski wants to merge 4 commits into
adobe:mainfrom
nwidynski:fix-ios-platform
Open

fix: ios platform user agents#10312
nwidynski wants to merge 4 commits into
adobe:mainfrom
nwidynski:fix-ios-platform

Conversation

@nwidynski

@nwidynski nwidynski commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Attempting to pull out some portions of #10102, specifically #10102 (comment)

Changeset is an audit of every isIOS, isFirefox and isChrome callsite potentially impacted.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@nwidynski nwidynski changed the title feat: fix ios platforms fix: ios platform user agents Jul 8, 2026
if (preventScrollCount === 1) {
if (isIOS()) {
restore = preventScrollMobileSafari();
if (isIOS() && isWebKit()) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apple opened up their platform for alternative rendering engines a while back. This is meant to future proof against something like https://github.com/minh-ton/reynard-browser.

@snowystinger snowystinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think this makes sense for preparing for the new browsers in iOS

Comment thread packages/react-aria/src/utils/useViewportSize.ts Outdated
Comment thread packages/react-aria/stories/utils/platform.stories.tsx

@snowystinger snowystinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified detection with new entries in story. I think the updates to the call sites are correct in the spirit of what they were checking


let ariaLive: 'off' | 'polite' | 'assertive' = 'polite';
if (isAppleDevice() && (!hasAriaLabel || isFirefox())) {
if (isAppleDevice() && (!hasAriaLabel || (!isWebKit() && isFirefox()))) {

@snowystinger snowystinger Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to spell this one out for practice:

Previous
iOS firefox -> false, no FxiOS matching
macOS firefox -> true

Now
iOS firefox today

  • isWebKit true, isFirefox true -> false

eventually

  • isWebKit false, isFirefox true -> true

macOS firefox -> true

The thinking being that Firefox will eventually have the same issues on iOS when it moves off webkit to their own engine, so it'll match desktop

@nwidynski nwidynski Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct. it also purposefully uses isWebKit rather than isIOS because these alt engines on ios may use an android ua for compatibility. The exception will be Chrome, which locked to AppleWebKit everywhere, so we will have to see whether they will offer something to differentiate on ios - tbd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants