You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected error: selectionChange: expected cursor but cursor is null. #3942
An unexpected error occurred in the renderer process.
Stack Trace
Error: selectionChange: expected cursor but cursor is null.
at Rs.getTOC [as selectionChange] (file:///D:/DATA/marktext-1.0beta-win64/resources/app.asar/dist/electron/webpack:/marktext/src/muya/lib/contentState/tableSelectCellsCtrl.js:260:9)
at Ws.<anonymous> (file:///D:/DATA/marktext-1.0beta-win64/resources/app.asar/dist/electron/webpack:/marktext/src/muya/lib/index.js:111:22)
at file:///D:/DATA/marktext-1.0beta-win64/resources/app.asar/dist/electron/webpack:/marktext/src/muya/lib/eventHandler/keyboard.js:72:7
Closing this with the regression-guard e2e specs added in #4268.
The selectionChange: expected cursor but cursor is null throw is no longer reachable through the user-action paths that were previously triggering it. The model-cursor fallback at src/muya/lib/contentState/paragraphCtrl.js:18-22 catches the transient DOM-selection-loss case (e.g. another script clearing the selection, blur-during-format).
Coverage lives in test/e2e/crash-selection-change.spec.ts.
If you still hit this throw on a recent build, please reopen with the exact MarkText version and reproduction steps.
Activity
Jocs commentedon May 23, 2026
Closing this with the regression-guard e2e specs added in #4268.
The
selectionChange: expected cursor but cursor is nullthrow is no longer reachable through the user-action paths that were previously triggering it. The model-cursor fallback atsrc/muya/lib/contentState/paragraphCtrl.js:18-22catches the transient DOM-selection-loss case (e.g. another script clearing the selection, blur-during-format).Coverage lives in
test/e2e/crash-selection-change.spec.ts.If you still hit this throw on a recent build, please reopen with the exact MarkText version and reproduction steps.
test(e2e): regression guards for previously-reported "Unexpected erro…
test(e2e): regression guards for previously-reported "Unexpected erro…