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

Disable BlurView on android #2351

Merged
merged 4 commits into from
Dec 28, 2023
Merged

Disable BlurView on android #2351

merged 4 commits into from
Dec 28, 2023

Conversation

pfrazee
Copy link
Collaborator

@pfrazee pfrazee commented Dec 28, 2023

Something is horribly wrong here.

We've had various reports from users that a <TextInput> will drop user input. Then we got #2344 reported, which gave us two lucky breaks:

  1. A video
  2. I could repro it in the simulator, thank god

With the repro I massively struggled to figure out the cause of this. Here are all of the bizarre behaviors:

  • The input does actually occur, it's just that the text is invisible. You can actually select the invisible text.
  • The onChange fires and the value is updated and the correct string is passed into the <TextInput>.
  • Despite the value updating, the <CharCounter> wasn't updating either.

I tested a variety of possible causes. I pulled out everything to do with BottomSheet. I removed all properties on the <TextInput>. I turned off autocomplete, autocorrect, etc. I also googled this aggressively and tried a variety of known hackfixes. None of this had any effect.

The <CharCounter> failing to update despite the value changing was the final clue. That led me to do 569ce38 which simply sets a key on any component in the render tree, and bizarrely that fixed both of the problems.

What this suggests to me is that somehow the render is failing to make its way through the react/react-native pipeline. I have absolutely no idea how that could be happening.


UPDATE

My god. I kept digging after this and discovered that running a setInterval in the header of a profile would show similar characteristics -- the UI would just stop updating -- but in the header of the home screen this didn't happen. Then I noticed that scrolling down a little bit in the profile fix this problem entirely.

Turns out, the @react-native-community/blur <BlurView> being used for the background of the back button was to blame. As soon as that was out of view, everything worked fine.

I need a drink.

@pfrazee
Copy link
Collaborator Author

pfrazee commented Dec 28, 2023

This issue is also affecting the profile editor on android

@pfrazee pfrazee changed the title Hackfix to force android to re-render the textinput in the report user modal Disable BlurView on android Dec 28, 2023
@AndreBordignon
Copy link

This bug is also affecting the register page, but it happened on my iPhone 11

@pfrazee pfrazee merged commit 0d960c5 into main Dec 28, 2023
4 checks passed
@pfrazee pfrazee deleted the 2344-force-textinput-rerender branch December 28, 2023 23:46
estrattonbailey added a commit that referenced this pull request Jan 1, 2024
* origin/main: (67 commits)
  Localize options in "Thread Preferences" screen (#2373)
  Bump ios build number and android version code
  Remove the KeyboardAvoidingView in account creation (close #2333) (#2366)
  1.62
  Create account tweaks (#2365)
  Fix sizing of the leftnav new post btn (#2248)
  Use memory caching for android lightbox (#2354)
  Disable page-transition animations on android (#2352)
  Disable BlurView on android (#2351)
  Handle birth dates as UTC, handle locale formatting (#2363)
  Fix desktop styles a bit
  Disable spanish translation until it's more thoroughly reviewed (#2362)
  minor search screen ux improvements (#2264)
  Temporarily disable the german translation (#2360)
  Web dropdowns (#2358)
  Mark more text as translatable (#2284)
  Remove patched color scheme code (#2340)
  support multiple og:image tags (#2305)
  Fix missing avatar moderation in replies (#2325)
  Fixes to feed load triggers (#2323)
  ...
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.

3 participants