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

button onPress callback is triggered twice #2743

Open
1 task done
ParaPawBor opened this issue Dec 12, 2024 · 0 comments
Open
1 task done

button onPress callback is triggered twice #2743

ParaPawBor opened this issue Dec 12, 2024 · 0 comments
Labels

Comments

@ParaPawBor
Copy link

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

@ParaPawBor ParaPawBor added the bug label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant