Skip to content
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

CSS Hack to fix safari text inputs #3613

Merged
merged 1 commit into from
Jun 16, 2021
Merged

CSS Hack to fix safari text inputs #3613

merged 1 commit into from
Jun 16, 2021

Conversation

roryabraham
Copy link
Contributor

@roryabraham roryabraham commented Jun 16, 2021

Details

For some reason the userSelect property is being overridden by react-native-web internals for text inputs. This CSS hack solves the problem and doesn't seem to introduce any others.

We should really consider filing a bug report in react-native-web, unless I'm gravely misunderstanding why TextInput components should by default (and in fact, in all cases) have the property user-select: none.

Fixed Issues

Fixes #3598

Tests / QA Steps

  1. Run the app in Safari
  2. Hit the + icon in the ReportActionCompose and choose Request Money/Split Bill.
  3. Enter an amount for the request, and hit Next
  4. Verify that you can enter a value into the text input above "What's it for?"

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Still working on Chrome:

image

Also working on Safari:

image

Mobile Web

image

Desktop

image

iOS

Android

@roryabraham roryabraham self-assigned this Jun 16, 2021
@roryabraham roryabraham requested a review from a team as a code owner June 16, 2021 16:36
@MelvinBot MelvinBot requested review from timszot and removed request for a team June 16, 2021 16:36
@parasharrajat
Copy link
Member

Awesome Find. I believe it has been fixed in the new version. @Jag96 here is trying to update the lib. So maybe, in that case, we don't need it at all.

@roryabraham
Copy link
Contributor Author

I believe it has been fixed in the new version.

Did you see something about this in the changelog?

@parasharrajat
Copy link
Member

I haven't checked but It seems a major problem that I think should have been addressed. Also, we saw one more bug which was fixed in the new version on RN-web so I guessed, but still a belief. 😄

@roryabraham
Copy link
Contributor Author

Okay, well @Jag96 if/when we upgrade RNW let's try to remember to check if we can remove this CSS hack.

@roryabraham
Copy link
Contributor Author

I haven't checked but It seems a major problem that I think should have been addressed

It might not have consistent reproduction ... maybe it has to do with the TextInput being nested in a ScrollView?

@timszot timszot merged commit 4a74405 into main Jun 16, 2021
@timszot timszot deleted the Rory-FixSafariTextInputs branch June 16, 2021 19:54
@OSBotify
Copy link
Contributor

🚀 Deployed to staging in version: 1.0.69-2🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@rushatgabhane
Copy link
Member

In my testing, updating React-Native-Web to 0.17.0 (latest) doesn't fix this issue.
Platform iOS Safari.

@OSBotify
Copy link
Contributor

🚀 Deployed to production in version: 1.0.73-3🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IOU - Request Money - Unable to write in field What's this for?
5 participants