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

how to listen click event when rotate end #490

Closed
lvqingxiang opened this issue Jun 16, 2021 · 9 comments
Closed

how to listen click event when rotate end #490

lvqingxiang opened this issue Jun 16, 2021 · 9 comments
Labels
bug Something isn't working complete
Milestone

Comments

@lvqingxiang
Copy link

Environments

  • Framework name:
  • Framework version:
  • Moveable Component version:
  • Testable Address(optional):

Description

now i listen click event on parent element ,but when child element rotate end, will trigger parent click. how to avoid ?

daybrush added a commit that referenced this issue Jun 17, 2021
@daybrush daybrush added the bug Something isn't working label Jun 17, 2021
@daybrush
Copy link
Owner

@lvqingxiang

  • moveable 0.25.3
  • react-moveable 0.28.3
  • preact-moveable 0.27.3
  • ngx-moveable 0.21.3
  • svelte-moveable 0.16.3
  • lit-moveable 0.2.3

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

@lvqingxiang
Copy link
Author

when i rotate end ,if my mouse position current on moveable internal ,it is work.when the mouse position out of moveable element and on parent node will trigger parent click, my version is 0.28.3 is there any way to avoid click trigger

@lvqingxiang
Copy link
Author

just like this https://codesandbox.io/s/rotateend-dpcii

@daybrush
Copy link
Owner

@lvqingxiang

Test 0.28.4-beta.0 version

@lvqingxiang
Copy link
Author

lvqingxiang commented Jun 20, 2021

after rotate end , any click event can not be triggered。😭 After the rotation, I still need to listen to the click event of the parent element
@daybrush

@daybrush
Copy link
Owner

@lvqingxiang
Oh sorry.

Test 0.29.0-beta.1 version.

@lvqingxiang
Copy link
Author

Thanks a million. it works ✌️

@lvqingxiang
Copy link
Author

😱 why 0.29.0-beta.1 can not trigger the current moveable target click event, @daybrush

@daybrush
Copy link
Owner

@lvqingxiang

Use onClick in Moveable

<Moveable
     onClick={e => {
     }}
/>

@daybrush daybrush added this to the 0.26.0 milestone Jul 10, 2021
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

2 participants