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

Mouseup triggered the click event for the image, and I hope he doesn't trigger it,It's not as simple as imagined #1755

Closed
hero8080 opened this issue May 7, 2024 · 1 comment

Comments

@hero8080
Copy link

hero8080 commented May 7, 2024

click to codesandbox

test-konva-event

1. Press the mouse in the red area

2. Slowly move to the first image

3. Then release the mouse

As a result, there was no click event triggered for the image

Now let's click on the first image

Repeat steps 1, 2, and 3

Surprisingly, it triggered the click event of the image

Repeat steps 1, 2, and 3

We click on the image in Chapter 2

The result met expectations and did not trigger a click event for the image

Problem summary: When a certain image is clicked, when the mouse moves over it and then releases the mouse, it will trigger mouseup and also trigger the click event of the image

Expectation: Mouseup will not trigger a click event. I wonder if the author is aware of this, is it designed like this, or is there a bug? Looking forward to your reply

The following is Simplified Chinese

以下是简体中文:

请先看动态录屏

1,红色区域按下鼠标

2,慢慢移动到第一张图

3,然后松开鼠标

结果,没有触发image的click事件

现在我们点击一第一张图

重复,1,2,3步骤

结果竟然触发了image的click事件

重复,1,2,3步骤

我们点击第二章图片

结果符合预期,没有触发image的click事件

问题总结:当点击了某一张图片,当鼠标移动到这张图片然后松开鼠标会触发mouseup 同时也会触发这张图的click事件

期望预期:mouseup不会触发click事件,不知道作者了解这件事吗,还是就是这样设计的,还是存在bug,期待您的回复

@hero8080 hero8080 changed the title Mouseup triggered the click event for the image, and I hope he doesn't trigger it Mouseup triggered the click event for the image, and I hope he doesn't trigger it,It's not as simple as imagined May 7, 2024
@lavrton
Copy link
Member

lavrton commented May 15, 2024

Thanks for the detailed message. Fixed. It will be released later.

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