react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Typing with TextInput is disorderly when inside Portal

Open ngotrongphuc opened this issue 3 years ago • 1 comments

Current behaviour

When handling TextInput with useState inside Portal, if i type faster than 1 word per second, it will becomes disorderly. useState within Portal

Expected behaviour

Without useState or wrapping TextInput inside Portal, everything works normally. without useState

Code sample

https://snack.expo.io/@phucngo/test Try to type fast as possible and you will see the bug

Screenshots (if applicable)

What have you tried

  1. I've remove Portal from the code and everything works perfectly
  2. I've tried not to use useState, just a simple <TextInput/> and it works fine but still a bit laggy

Your Environment

software version
android AVD 9
react-native-cli 2.0.1
react-native 0.64.1
react-native-paper 4.9.1
node 14.17.0
yarn 1.22.10
expo sdk

ngotrongphuc avatar Jun 23 '21 13:06 ngotrongphuc

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

  • react-native-vector-icons
  • 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:

  • react-native (found: 0.64.1, latest: 0.64.2)
  • react-native-paper (found: 4.9.1, latest: 4.9.2)

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

github-actions[bot] avatar Jun 23 '21 13:06 github-actions[bot]

There is an issue with inputs within portals in general, not only in the paper library. Within the other issue you can find the workaround.

Please also check that approach which can be helpful.

lukewalczak avatar Dec 12 '22 14:12 lukewalczak