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

Clicking is not working after resizing #713

Closed
alexconstantin opened this issue Aug 3, 2022 · 5 comments
Closed

Clicking is not working after resizing #713

alexconstantin opened this issue Aug 3, 2022 · 5 comments
Labels
bug Something isn't working complete
Milestone

Comments

@alexconstantin
Copy link

alexconstantin commented Aug 3, 2022

Environments

Description

Please try clicking the button. It displays the current date in MS format. After triggering a resize using one of the handles, clicking the button is not possible anymore. I believe the event is prevent defaulted.

Some notes:

  1. It didn't happen with older versions (0.32.0 works ok)
  2. I believe it has something to do with "preventClickEventOnDrag" flag (setting it to false fixes the issue).
  3. If you drag the element after resizing it, the button starts working again.

Thank you!

@vohzd
Copy link

vohzd commented Aug 3, 2022

I was just about to report this very same issue. (Using version 0.34.2)

Downgrading to 0.32.0 or preventClickEventOnDrag: false resolves the issue.

@daybrush daybrush added the bug Something isn't working label Aug 3, 2022
@daybrush daybrush added this to the 0.35.0 milestone Aug 3, 2022
@daybrush
Copy link
Owner

daybrush commented Aug 3, 2022

@alexconstantin @vohzd

moveable's new version is released. Check it again.

@alexconstantin
Copy link
Author

alexconstantin commented Aug 4, 2022

@daybrush The button is clickable again starting with 0.34.3 version. Thank you! However, I'm seeing a different issue now:

0.34.3: https://codesandbox.io/s/recursing-thunder-zfjc4m?file=/src/index.ts
0.32.0: https://codesandbox.io/s/autumn-moon-8uwhpz

An additional click event is being propagated to the body, when executing a resize like this: start using handle, but move the mouse outside of the target and finish the resize over the body, not over the resize trigger itself. Please check this loom for details: https://www.loom.com/share/84d8a63ceac04b83a3cd24195a470e4c (however it seems the cursor is not recorded property)

P.S.: I'm not really sure if it's an issue or this is the expected behaviour, but is there a way to stop that extra click event being triggered on the body?

P.S. 2: Setting "clickable" to false or any value for "preventClickEventOnDrag" does not fix this.

@daybrush
Copy link
Owner

daybrush commented Aug 6, 2022

@alexconstantin

moveable's new version is released.

Check it again.

@alexconstantin
Copy link
Author

Working perfectly in 0.35.0. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working complete
Projects
None yet
Development

No branches or pull requests

3 participants