getValue() not returning the text displayed in the editor itself #7158
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the issue
We occasionally see cases where the call to getValue() returns the editor content prior to user modifications, rather than the user modified text. We've added console logging which displays the text returned by getValue() to which reveals the text does not match what the user sees in the editor. Once the editor is in this state, getValue() will stubbornly refuse to return the modified text.
Unfortunately, we don't have a reproducible case. However, users have reported the problem and we see the problematic behavior in their console log messages. It seems unlikely that getValue() is broken but we have no other explanation for the behavior and wonder if anyone else has experienced this issue.
This occurs using CodeMirror version 5.65.16 in a TypeScript-based web app. When it (infrequently) happens, it happens in Chrome on both macOS and Windows. Don't know if it happens on other browsers.
Browser and platform
No response
Reproduction link
No response