Skip to content

Gesture state: ctrlKey always true during pinch with usePinch #683

Description

@jiito

Describe the bug

When working with the usePinch hook, the value of ctrlKey, event.ctrlKey are both true when the hook's callback is called. The expected behavior is that these values are only true when I am physically holding down the ctrlKey. My intended use is to filter out the wheel plus control gesture.

Additionally, I tried using down, and buttons. But these always seem to be false and 0 respectively.

From the following issues, my understanding is that this has to do with how Chromium handles pinch events on a Mac.

#401
#80

Sandbox or Video

https://codesandbox.io/p/sandbox/chntrj

Information:

  • Use Gesture version: 10.3.1
  • Device: Macbook Pro
  • OS: Sonoma 14.5
  • Browser: Arc

Checklist:

  • I've read the documentation.
  • If this is an issue with drag, I've tried setting touch-action: none to the draggable element.

Thanks in advance for any help!!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions