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

[BUG] onTap callback doesn't fire on child component after parent is dragged #2953

Open
bporcelli opened this issue Dec 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bporcelli
Copy link

1. Read the FAQs 👇

2. Describe the bug

When a tappable component that is a child of a draggable component is used to initiate a drag gesture, its onTap callback no longer fires after the drag gesture ends. I suspect this is because the event is being filtered out by isValidPressEvent before isPressing.delete(element) is called here.

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/p/sandbox/88xds7

4. Steps to reproduce

Steps to reproduce the behavior:

  1. Open CodeSandbox
  2. Use blue "Child" div as handle to drag parent div
  3. Tap "Child" div after drag gesture ends
  4. Observe that "Tapped" message is not logged

5. Expected behavior

onTap handler should fire when "Child" component is clicked, even if "Child" was previously used to initiate a drag gesture on the parent element.

6. Video or screenshots

Screen.Recording.2024-12-19.at.5.49.04.PM.mov

7. Environment details

N/A

@bporcelli bporcelli added the bug Something isn't working label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant