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

only one of dblclick or click event is triggered #482

Open
coleea opened this issue Mar 28, 2023 · 4 comments
Open

only one of dblclick or click event is triggered #482

coleea opened this issue Mar 28, 2023 · 4 comments

Comments

@coleea
Copy link

coleea commented Mar 28, 2023

version : 3.0.0-beta.8

when I double-click in zoomview, Sometimes only one of dblclick or click event is triggered.

Sometimes both dblclick and click event triggered. But sometimes only one of dblclick or click event is triggered.
I don't know by which condition the only one event is triggered.

I attach a video.
in this video, console.log on chrome devtools outputs each event

KakaoTalk_20230328_111926220.mp4

Clicking on a particular timeline triggers only one of click and dblclick
I don't know why both click and dblclick won't trigger

You can test via https://rumpus-six.vercel.app/

And if this is a bug, I want to fix this. I would appreciate it if you could let me know which source code I should refer to

@coleea coleea changed the title zoomview.dblclick event is not triggered sometimes. only one of dblclick or click is triggered Mar 28, 2023
@coleea coleea changed the title only one of dblclick or click is triggered only one of dblclick or click event is triggered Mar 28, 2023
@chrisn
Copy link
Member

chrisn commented Mar 28, 2023

You are very welcome to try to fix this. Peaks.js listens for click and dblclick events from Konva, here for example. So you may also need to look at how Konva generates these events.

@chrisn
Copy link
Member

chrisn commented Mar 29, 2023

I have not been able to reproduce this problem, using the demo pages.

If I double-click on a segment, I see these events:

segments.click: {segment: Segment, evt: MouseEvent}
zoomview.click: {time: 27.028027210884353, evt: MouseEvent}
segments.dblclick: {segment: Segment, evt: MouseEvent}
zoomview.dblclick: {time: 27.028027210884353, evt: MouseEvent}

When I double-click where there is no segment, I see these events:

zoomview.click: {time: 35.48009070294785, evt: MouseEvent}
zoomview.dblclick: {time: 35.48009070294785, evt: MouseEvent}

@coleea
Copy link
Author

coleea commented Apr 3, 2023

@chrisn thank you for answer. I will check demo and create new project for testing

@chrisn
Copy link
Member

chrisn commented Apr 4, 2023

In case it helps, I think that the relevant code in Konva that generates click and dblclick events is here.

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