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

usePointerSwipe right mouse click response problem #2338

Closed
7 tasks done
Miles-C opened this issue Oct 19, 2022 · 0 comments · Fixed by #2379
Closed
7 tasks done

usePointerSwipe right mouse click response problem #2338

Miles-C opened this issue Oct 19, 2022 · 0 comments · Fixed by #2379

Comments

@Miles-C
Copy link

Miles-C commented Oct 19, 2022

Describe the bug

After the right mouse button is clicked on the element, the onSwipe callback function will always be executed, and it will only stop when the element is clicked again. When using the right mouse button in the browser, a menu will pop up. At this time, the element cannot recognize the mouseup, which will cause onSwipe to be triggered all the time.

Reproduction

https://vueuse.org/core/usePointerSwipe/

System Info

System:
    OS: macOS 12.2.1
    CPU: (8) arm64 Apple M1
    Memory: 86.75 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    npm: 8.5.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 100.0.4896.60
    Safari: 15.3
  npmPackages:
    @vueuse/core: ^9.3.0 => 9.3.0 
    @vueuse/nuxt: ^9.3.0 => 9.3.0

Used Package Man

Video_22-10-20_00-37-28.mp4

ager

pnpm

Validations

antfu pushed a commit that referenced this issue Nov 9, 2022
Fix issue where a secondary click (the right button on a right-handed
mouse) on an element using usePointerSwipe() is treated as if the
primary button (left click on a right-handed mouse) has started a drag.

- Rename filterEvent() to eventIsAllowed() for better clarity
- Fix typo in docs and make punctuation consistent

Fixes #2338
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

Successfully merging a pull request may close this issue.

1 participant