Repository navigation
fix: fix iPhone and iPad detection when platform hint is iOS - #11008
Open
reidbarber wants to merge 2 commits into
Open
reidbarber wants to merge 2 commits into
reidbarber wants to merge 2 commits into
Conversation
|
Build successful! 🎉 |
Agent Skills ChangesModified (9)
InstallReact Spectrum S2: React Aria: |
snowystinger
approved these changes
Nov 20, 2026
Member
|
any idea how to turn on the preview of this feature as well? |
Contributor
|
In my opinion, this is a bit early for RSP to consider. The standards position on User Agent Client Hints (the official spec name for userAgentData) is not even affirmed yet. See WebKit/standards-positions#70 PS: Its not a big change per se, but I just wanted to have that considered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10980
Summary
This is a forward-compatible fix to keep our iOS-specific behavior working if/when WebKit enables
navigator.userAgentDataby default.WebKit’s implementation of it returns
"iOS"for both iPhone and iPad. We currently prefernavigator.userAgentDataovernavigator.platform, so whenever they enable that feature, neither device check will match. With this change, for"iOS", we fall back tonavigator.platformto distinguish the two devices.📝 Test Instructions
Unit tests should cover, but we can smoke test device check stories.
Release impact
✅ PR Checklist
🧢 Your Project