-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow type() and click() to select an element inside contenteditable. #9066
Conversation
Thanks for taking the time to open a PR!
|
flaky failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome job
const finalCoords = getCoordinatesForEl(cy, $el, options) | ||
let finalEl | ||
|
||
// When a contenteditable element is selected, we don't go deeper, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sainthkh would it be more accurate to say that "when a host contenteditable element is selected"? It feels a little bit like the comment doesn't match the condition because inner elements can still be contenteditable (.isContentEditable === true
) but they won't pass this test here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. It seems that When a selected element is contenteditable
can better describe the code.
User facing changelog
When
cy.type()
andcy.click()
were used against an element insidecontenteditable
, it only worked with the rootcontenteditable
element. With this PR, this behavior is fixed. Users can freely work with elements inside contenteditable.Additional details
contenteditable
, it is sometimes necessary to work with elements inside it.type()
andclick()
changed slightly.runAllCheck
inactionability.js
to ignore elements insidecontenteditable
.How has the user experience changed?
PR Tasks
cypress-documentation
? => Add this to 6.0 changes doc.