Mouse events not sending pointerId
See original GitHub issueCurrent behavior:
Failed to execute 'setPointerCapture' on 'Element': No active pointer with the given id is found.
Desired behavior:
Element.hasPointerCapture()
is not invoked by Cypress:
https://developer.mozilla.org/en-US/docs/Web/API/Element/hasPointerCapture
Steps to reproduce: (app code and test code)
Use the code from: https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture
We created 2 simple examples (attached as zips, see below):
- A slider object which uses pointer capture
- A canvas which uses pointer events to draw
Versions
Cypress: 3.4.0 - 3.6.1 OS: Win10 Browser: Chrome 78
Attachments
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
PointerEvent.pointerId - Web APIs - MDN Web Docs
The pointerId read-only property of the PointerEvent interface is an identifier assigned to a given pointer event. The identifier is unique, ...
Read more >javascript - How to get a pointerId from a MouseEvent for use ...
I can't use pointerdown events since those are the unsupported events. They contain a pointerId , but mouse events do not.
Read more >Pointer Events - W3C
Publication as a Working Draft does not imply endorsement by W3C and ... a generic pointerId value of 0 or 1 for the...
Read more >Pointer events - The Modern JavaScript Tutorial
Long ago, in the past, there were only mouse events. ... Please note: the pointerId is assigned not to the whole device, ...
Read more >SyntheticEvent - React
The synthetic events are different from, and do not map directly to, ... Focus Events; Form Events; Generic Events; Mouse Events; Pointer Events...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We did find a solution (with the assumption Chrome always uses pointerId 1):
I found that this didn’t work in Firefox. Changing the
pointerId
from1
to0
occasionally did but not always.