cy.click()
doesn't click the right element when used with shadow elements in Chrome.
#19260
Labels
existing workaround
stage: awaiting external fix
A 3rd party bug in Cypress - awaiting release
stale
no activity on this issue for a long period
topic: shadow dom
Issues when testing shadow dom
Current behavior
cy.click()
doesn't click the right element when used withcy.shadow()
in Chrome.Desired behavior
cy.click()
should click the right element when used with shadow elements in Chrome.Test code to reproduce
Cypress Version
9.1.1
Other
I found this problem when working for #18008. It's only happening in Chrome. This test passes in Firefox.
After some research, I learned that it's happening because the spec about
elementFromPoint
is ambiguous. Please check below:Thankfully, there is a workaround.
Workaround
Passing
{ position: 'top' }
would solve the problem.The text was updated successfully, but these errors were encountered: