Skip to content

Prop 'selectTextOnFocus' doesn't work on iOS #124

Description

@schrulnz

I want the text of a Kohona element to be selected as soon as the TextInput is klicked. This works fine on Android, but on iOS it doesn't. I already had a look at the Kohona.js file of the library but I couldn't find the problem.

I also tried clearTextOnFocus, this works fine on iOS. Also, if I use a normal RN <TextInput ... />, it works as well.

Some of my dependencies:
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-textinput-effects": "0.6.1",

This is my code:

                    import {Hideo, Kohana, Kaede} from 'react-native-textinput-effects';
                    // ...
                    <Kohana
                        inputStyle={[styles.inputStyle, {color: '#666'}]}
                        labelStyle={styles.label}
                        label={typeOfPoints}
                        labelContainerStyle={{ padding: 5 }}
                        iconClass={AwesomeIcon}
                        iconName={'bar-chart'}
                        iconColor={'#000'}
                        iconContainerStyle={{ padding: 10 }}
                        inputPadding={16}
                        returnKeyType={'done'}
                        keyboardType={'phone-pad'}
                        value={value}
                        onChangeText={(input) => this.setPoints(typeOfPoints, input)}
                        selectTextOnFocus={true}
                        useNativeDriver
                    />

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions