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

'tap' events are firing on 'doubletap' and 'hold' V1.10.11 #964

Open
tmtron opened this issue Apr 15, 2022 · 4 comments
Open

'tap' events are firing on 'doubletap' and 'hold' V1.10.11 #964

tmtron opened this issue Apr 15, 2022 · 4 comments

Comments

@tmtron
Copy link

tmtron commented Apr 15, 2022

When we double click, then tap will also fire (with event.double is false).
The same is true for 'hold'

If I understood this comment #155 (comment) correctly, then it is expected, that (on double clikc) the tap event is also fired with event.double=false - but this is not the case (event.double=true)

Here is a full stackblitz example

Expected behavior

On double-click the tap event should fire and have event.double=true.
On hold the tap event should not fire.

Actual behavior

On double-click the tap event fires and has event.double=false.
On hold the 'hold' event fires, and then the tap event fires.

System configuration

1.10.11:
Google Chrome Version 100.0.4896.88:
Windows 10:

@tmtron tmtron changed the title 'tap' events are firing on 'doubletap' V1.10.11 'tap' events are firing on 'doubletap' and 'hold' V1.10.11 Apr 16, 2022
@stale
Copy link

stale bot commented Apr 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 30, 2022
@tmtron
Copy link
Author

tmtron commented Apr 30, 2022

not stale

@stale stale bot removed the stale label Apr 30, 2022
@taye
Copy link
Owner

taye commented Jun 10, 2022

I don't see tap firing with double == false, but I realized that doubletap events don't have a double property. I'm going to add a double == true property to doubletap events.

If you want to ignore taps after hold, you can check tapEvent.dt < 500

@taye taye closed this as completed Dec 25, 2022
@tmtron
Copy link
Author

tmtron commented Dec 26, 2022

If you want to ignore taps after hold, you can check tapEvent.dt < 500

thanks, that works: tapEvent.dt >= 500 can be detected to use a tap after hold (which I want to ignore)

I don't see tap firing with double == false

  • open the stackblitz example
  • double click on the text click target
  • check the console output:
    image
    • you can see that the tap event fires (with double=false) first, and then the doubletap event fires
    • I think double should be true, for the tap event , right?

@taye taye reopened this Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants