Open eltschka-christopher-auticon opened 6 months ago
The debug.log as file.
That is weird. I can recreate this. The assertion that the new content was typed fails in Chrome but not in Firefox. I tried back to Chrome 118 and it was the same behavior. I also tested back to Cypress 10.0, so this isn't a recently introduced bug.
Chrome
Firefox
Small update: The problem also occurs on Edge and Electron (not really surprising, given that they use the same browser enginge, but I think worth noting anyway).
Do we have any updates on this issue, i'm facing with cypress 13.13.1 as well
Current behavior
Cypress on Chrome fails to type on an editable h6 if the contenteditable was set by JavaScript and the element has a tabindex.
Note that editing succeeds on Firefox, or if contenteditable was set directly as attribute, or if no tabindex attribute was given.
Desired behavior
Cypress should type the text into the editable element.
Test code to reproduce
This test case is self-contained thanks to a mock page, However the real case where I found the problem did not use a mock page, so that fact should be irrelevant to the error.
Cypress Version
13.8.1
Node version
18.19.0
Operating System
Debian GNU/Linux 12 (bookworm)
Debug Logs
Other
Querying whether the element has contenteditable set (
cy.get(selector).invoke("attr", "contenteditable").should("eq", "true");
) succeeds after the click().