question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Input inside of Portal duplicates text

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
petrometrocommented, Feb 26, 2022

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.

0reactions
lukewalczakcommented, Nov 14, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

toLowerCase on TextInput value is creating duplicate text if ...
I created a TextInput that takes a value, then lower cases it, adds it to state, and sets it as the default value....
Read more >
Duplicate value in multiple textarea while using ng-repeat
Hi Guys, We have created multiple textarea field by using ng-repeat, the field are getting display as intended.
Read more >
show duplicate value inside table by alert - MSDN - Microsoft
i have this code i want to show duplicate value inside third column ... cols += '<td><input type="text" name="name' + counter + '"/></td>';...
Read more >
how to remove duplicate from String? | Blue Prism Product
If the current character doesn't match the previous one, the flow will keep on concatenating and store it in the output data item....
Read more >
Detecting Duplicate Records with GlideAggregate - SN Pro Tips
The "javascript:" in the beginning, tells the query builder that we're going to execute some javascript inside the query, before it is evaluated ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found