Skip to content

onSubmitEditing fires onCancel & cancel fires onCancel twice in Android #3247

@amie-wilt

Description

@amie-wilt

Explain what you did (Required)

I'm using the SearchBar component and am using the onSubmitEditing to submit the search. I also have an onCancel event that calls a goBack method to close the screen (it's a modal view of React Navigation).

Expected behavior (Required)

I would expect that when I hit the "go" button on the keyboard the onSubmitEditing would fire and I would expect that when I hit the "cancel" button, the onCancel method would fire once.

Describe the bug (Required)

When I hit the "go" button, onCancel is called. Less impactful but still worth nothing, when I hit the "cancel" button, onCancel fires twice.

To Reproduce (Required)

We highly recommend that you re-create the bug on Snack. If not, list the steps that a reviewer can take to reproduce the behaviour:

Screenshots (Required)

screen-recording.mov

Your Environment (Required):

Mac BigSur 11.0

software version
react-native-elements 3.1.0
react-native 0.63.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions