fix: ios platform user agents#10312
Conversation
| if (preventScrollCount === 1) { | ||
| if (isIOS()) { | ||
| restore = preventScrollMobileSafari(); | ||
| if (isIOS() && isWebKit()) { |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
Thanks, I think this makes sense for preparing for the new browsers in iOS
snowystinger
left a comment
There was a problem hiding this comment.
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()))) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Attempting to pull out some portions of #10102, specifically #10102 (comment)
Changeset is an audit of every
isIOS,isFirefoxandisChromecallsite potentially impacted.✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: