-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Form): Disable autofocus on error for some fields on iOS #1307
Conversation
Size stats
|
Accessibility report ℹ️ You can run this locally by executing |
export const isAndroid = (platformOverrides: Theme['platformOverrides']): boolean => { | ||
if (platformOverrides.platform === 'android') { | ||
return true; | ||
} | ||
|
||
return getUserAgent(platformOverrides).toLowerCase().includes('android') && !isEdgeOrIE; | ||
}; | ||
|
||
export const isIos = (platformOverrides: Theme['platformOverrides']): boolean => { | ||
if (platformOverrides.platform === 'ios') { | ||
return true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to make it easier to force the platform in tests
Deploy preview for mistica-web ready! ✅ Preview Built with commit 0cfd623. |
Fields that are excluded from autofocus on error in iOS because the focus action opens the picker/selector
Note: scroll to element not affected
A simple unit test that covers these scenarios has been added but you can be manually test this using playroom with a snippet like:
and opening the preview in an iphone