facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
117.07k stars 24.07k forks source link

Dialog TextInput Cursor Flickering #37048

Closed tingan closed 1 month ago

tingan commented 1 year ago

Description

when use react native paper dialog with input:

handleTextChange(text)} style={styles.input} /> I reported first to react native paper github issues, but they say it's issue with react native itself. https://stackoverflow.com/questions/64921365/react-native-paper-textinput-in-modal-cursor-flashes-backwards-after-a-characte ### React Native Version 0.71.6 ### Output of `npx react-native info` System: OS: macOS 13.2.1 CPU: (10) x64 Apple M1 Pro Memory: 21.62 MB / 16.00 GB Shell: 5.8 - /usr/local/bin/zsh Binaries: Node: 18.10.0 - /usr/local/bin/node Yarn: 3.5.0 - /usr/local/bin/yarn npm: 8.19.2 - /usr/local/bin/npm Watchman: 2022.10.24.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9014738 Xcode: 14.3/14E222b - /usr/bin/xcodebuild Languages: Java: 17.0.2 - /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.7 => 0.71.7 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found ### Steps to reproduce https://stackoverflow.com/questions/64921365/react-native-paper-textinput-in-modal-cursor-flashes-backwards-after-a-characte ### Snack, code example, screenshot, or link to a repository https://stackoverflow.com/questions/64921365/react-native-paper-textinput-in-modal-cursor-flashes-backwards-after-a-characte
github-actions[bot] commented 1 year ago
:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
github-actions[bot] commented 8 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

kav commented 8 months ago

Seeing this issue on 0.72.6 likely related to https://github.com/facebook/react-native/issues/38105 https://github.com/facebook/react-native/issues/37612

I can't get a simple repro as yet. Identical TextInput components on different app screens behave differently here but when the issue repros for controlled components I'm seeing a onChangeText call with the previous value followed by one for the current value in a loop leading to a flickering between say for example test and tes.

Disabling multiline immediately stops this behavior. Using defaultValue instead of value for controlling also stops this behavior

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 7 days with no activity.