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 events are duplicated in case preserveObjectStacking is ON #4296

Closed
solomax opened this issue Sep 8, 2017 · 12 comments
Closed

Mouseup events are duplicated in case preserveObjectStacking is ON #4296

solomax opened this issue Sep 8, 2017 · 12 comments

Comments

@solomax
Copy link

solomax commented Sep 8, 2017

Version

1.7.17

Test Case

https://jsfiddle.net/solomax666/r2nuv845/

Steps to reproduce

  1. run the fiddle
  2. push 'Start' button on video
  3. push 'Pause' button on video

Expected Behavior

Video should pause

Actual Behavior

Video continue playing

With debugger I find out on mouseup is being called twice due to mouseup target gets duplicated. This is not the case when preserveObjectStacking is OFF (line 2 of fiddle is commented out)

@solomax solomax changed the title Mouseup events are double in case preserveObjectStacking is ON Mouseup events are duplicated in case preserveObjectStacking is ON Sep 8, 2017
@asturur
Copy link
Member

asturur commented Sep 8, 2017

i see the bug in findTarget.
Before i get mad reading all your fiddle, can you explain me how the things are grouped in your use case:

Video + controls are a group?

@solomax
Copy link
Author

solomax commented Sep 8, 2017

There are 2 groups:
One is Play button: circle, triangle and 2 rects
Another one: everything else: poster image, video, and 2 rects to display progress, and play button

So Play group is nested into 'main' group

@asturur
Copy link
Member

asturur commented Sep 8, 2017

the 2 groups are grouped togheter?

@solomax
Copy link
Author

solomax commented Sep 8, 2017

Yep, Main group, contains 'Play' group

@solomax
Copy link
Author

solomax commented Sep 8, 2017

I can try to 'clean up' the fiddle. The issue can easily be debugged if you put breakpoint into 'mouseup' handler

Surprisingly 'mousedown' seems to be not affected

@asturur
Copy link
Member

asturur commented Sep 8, 2017 via email

@solomax
Copy link
Author

solomax commented Sep 8, 2017

I'll try to simplify the fiddle and will let you know

@asturur
Copy link
Member

asturur commented Sep 8, 2017

is ok i have the info i need.

@solomax
Copy link
Author

solomax commented Sep 8, 2017

OK, Thanks!
Please let me know if there is anything I can do

@asturur
Copy link
Member

asturur commented Sep 8, 2017

Well to be honest 100% i did not try the solution. but i m confident it works, the test pass.

@solomax
Copy link
Author

solomax commented Sep 8, 2017

I have applied your patch locally, seems to work as expected
Thanks a lot!

@solomax
Copy link
Author

solomax commented Sep 8, 2017

Was able to build it :)
Thanks a lot for the quick fix!

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