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

[Android] selection works incorrect and crashes in TextInput component #26047

Closed
blohamen opened this issue Aug 13, 2019 · 9 comments
Closed
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@blohamen
Copy link

React Native version:

System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
    Memory: 6.59 GB / 15.38 GB
  Binaries:
    Node: 8.11.1 - C:\Program Files\nodejs\node.EXE
    npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
    Watchman: 4.9.0 - C:\Users\Ilya_Staver\Desktop\AMIClient\watchman.EXE
  IDEs:
    Android Studio: Version  3.4.0.0 AI-183.6156.11.34.5692245

      react: 16.8.6
      react-native: 0.60.4 

Steps To Reproduce

  1. Create TextInput component on Android with onSelectionChange handler and selection prop
  2. Try to type some letters.

Describe what you expected to happen:
TextInput should correct update selection

Snack, code example, screenshot, or link to a repository:

   onSelectionChange = ({ nativeEvent: { selection } }) => this.setState({ selection });

   <TextInput
                    ref={ref => this.inputRef = ref}
                    style={styles.messageInput}
                    maxLength={maxMessageLength}
                    multiline
                    blurOnSubmit={false}
                    onSelectionChange={this.onSelectionChange}
                    selection={this.state.selection}
                    selectionColor={blueBase}
                    onChangeText={this.onChangeText}
                    value={this.state.message}
                    autoCapitalize="none"
                    underlineColorAndroid={transparent}
                    placeholder={this.getPlaceholderMessage()}
                    placeholderTextColor={grayDarkTransparent(0.35)}
                    editable={!this.state.isVoiceRecording}
                />

untitled

@blohamen blohamen added the Bug label Aug 13, 2019
@react-native-bot react-native-bot added Component: TextInput Related to the TextInput component. Platform: Android Android applications. labels Aug 13, 2019
@vforvasile
Copy link

vforvasile commented Aug 23, 2019

The same bug happens in 0.60.5
related to this issue #25265

@srhtylmz19
Copy link

any update?

@blohamen
Copy link
Author

blohamen commented Oct 4, 2019

Issue still reproduced in React Native 0.61.2

@vforvasile
Copy link

vforvasile commented Oct 8, 2019

Someone made a pull request #26680

@callcter
Copy link

same issue in 0.61.2

@stale
Copy link

stale bot commented Jan 14, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 14, 2020
@blohamen
Copy link
Author

Still reproduced in 0.61.5

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 14, 2020
@stale
Copy link

stale bot commented Apr 13, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 13, 2020
@stale
Copy link

stale bot commented Apr 21, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Apr 21, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants