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

Input inside of Portal duplicates text #2780

Open
crutchcorn opened this issue Jun 18, 2021 · 8 comments
Open

Input inside of Portal duplicates text #2780

crutchcorn opened this issue Jun 18, 2021 · 8 comments

Comments

@crutchcorn
Copy link
Contributor

crutchcorn commented Jun 18, 2021

Current behaviour

When a react-native TextInput is inside of a Portal (even if as a descendant, say, inside nested Views inside of a Modal ), when the user types, it will (inconsistently) duplicate the existing text in the input box

There doesn't seem to be a correlation between how much the user types. In my app (a non-minimal repro that I won't link), it seems to be nearly every 2-3 characters, but the minimal repro that I WILL link happens significantly more infrequently

I have only confirmed this behavior on Android, have not tested on iOS.

Expected behaviour

Text inputs in Portal should not duplicate text incorrectly

Code sample

https://github.com/crutchcorn/rn-paper-portal-bug-repro

Screenshots (if applicable)

keyboard-bug

What have you tried

  • Upgrading react-native
  • Upgrading react-native-paper
  • Creating minimal repro
  • Confirmed this happens on both emulator and physical device

Your Environment

software version
ios or android android v11
react-native 0.64.2
react-native-paper 4.9.1
node 12.16.1
npm or yarn yarn 1.22.5
expo sdk n/a
@github-actions
Copy link

Couldn't find version numbers for the following packages in the issue:

  • react-native-vector-icons
  • npm
  • expo

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • yarn (found: 1.22.5, latest: 1.22.10)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

@lukutism
Copy link

Up, faced same issue. :)

@alexandreerick
Copy link

Same issue here.

@andordavoti
Copy link

Same issue here, facing this after upgrading from React Native v0.62.2 to v0.63.0

@lukewalczak
Copy link
Member

Is that issue still valid? Wondering whether the reported bug is specific to the library or react-native in general.

@petrometro
Copy link

As of RN 0.67.2 and RNP 4.11.2, I ran into this problem when I had a TextInput inside a Modal (which was inside a Portal), testing on a Samsung Galaxy Tab.
The solution of setting autoCorrect={false} on the TextInput worked for me.

@malgorzatamaz malgorzatamaz self-assigned this Oct 28, 2022
@JoshuaSkootsky
Copy link

this is a really weird bug and nothing has prepared me for this.

@seba9999
Copy link

Still experiencing it ! Can't say how much time I've lost finding it was linked to Portal !!

I've found hints Here

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

No branches or pull requests

10 participants