callstack/react-native-paper

Input inside of Portal duplicates text

Open

#2,780 opened on Jun 18, 2021

View on GitHub
 (9 comments) (5 reactions) (1 assignee)TypeScript (2,005 forks)batch import
HacktoberfestKeep openedPortalhelp wantedrepro provided

Repository metrics

Stars
 (11,550 stars)
PR merge metrics
 (Avg merge 8d 12h) (10 merged PRs in 30d)

Description

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

Contributor guide