Skip to content

Commit b85c418

Browse files
authored
Update shadow.mdx
- Update the suggestion to pass 'top' to cy.click() using the options defined in cy.click()'s documentation
1 parent 6ff2c73 commit b85c418

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/api/commands/shadow.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ When working with `cy.click()`, it sometimes won't click the right element in
9696
Chrome. It's happening because of
9797
[the ambiguity in spec](https://bugs.chromium.org/p/chromium/issues/detail?id=1188919&q=shadowRoot%20elementFromPoint&can=2).
9898

99-
In this case, pass `{ position: 'top' }` to `cy.click()` like below:
99+
In this case, pass `'top` to `cy.click()` like below:
100100

101101
```js
102102
cy.get('#element')
103103
.shadow()
104104
.find('[data-test-id="my-button"]')
105-
.click({ position: 'top' })
105+
.click('top')
106106
```
107107

108108
## Command Log

0 commit comments

Comments
 (0)