Skip to content

button onPress callback is triggered twice #2743

Open
@ParaPawBor

Description

@ParaPawBor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

onPress callback is triggered twice if button is pressed with "Enter" key and removed during the callback.

Expected behavior

onPress callback is invoked once

Steps to reproduce

  1. Create button (e.g. Pressable with role="button"
  2. Add onPress callback that will remove the button
  3. Focus the button (e.g. "Tab" key)
  4. Press "Enter" key

Test case

https://codesandbox.io/p/devbox/ypp6kr

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions