cy.click()
internally triggers mousemove
event without provided click
event modifiers
#28077
Labels
stale
no activity on this issue for a long period
Current behavior
When the
click
command is used, it internally dispatches a number of events,pointerover
,pointerenter
,mouseover
,mouseenter
,pointermove
,mousemove
. The problem is that these events are not dispatched with any of the keyboard modifiers that are passed to theclick
command.cypress/packages/driver/src/cy/commands/actions/click.ts
Line 212 in 5a7eee5
cypress/packages/driver/src/cy/mouse.ts
Lines 372 to 383 in fd2a27d
This is problematic for my project because we have some functionality that sets state on
mousemove
whilectrl
is pressed. When theclick
command is used, no modifiers are passed and that causes the finalmousemove
event that Cypress dispatches internally to clear application state. This requires us to bypass some of our affected application code while Cypress is running, which is not ideal.Desired behavior
Desired behavior is that the
click
command passes it's modifiers intomouse.move
so that those modifiers are applied to the internally dispatched mouse events.cypress/packages/driver/src/cy/commands/actions/click.ts
Line 212 in 5a7eee5
Test code to reproduce
https://github.com/jasonmevans/cypress-test-tiny
Cypress Version
12.11.0
Node version
v16.19.0
Operating System
13.5.2 (22G91)
Debug Logs
No response
Other
Related to this Discord thread -- https://discord.com/channels/755913899261296641/1163497683605012552
The text was updated successfully, but these errors were encountered: