Builtin spellchecker never marks text typed into a CodeMirror 6 editor — plain contenteditable works; same page fully checked in plain Chrome 152
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
44.0.0
What operating system(s) are you using?
Ubuntu
Operating System Version
Ubuntu Linux x64
What arch are you using?
x64
Last Known Working Electron version
Not bisected
Does the issue also appear in Chromium / Google Chrome?
No
Expected Behavior
With the builtin spellchecker enabled (spellcheck: true webPreference, session.setSpellCheckerLanguages(['en-US'])), any contenteditable editing host with spellcheck="true" lang="en-US" gets the red squiggle and context-menu params.misspelledWord/suggestions for misspelled typed text — including one driven by CodeMirror 6.
Actual Behavior
On a page with three such editables — (1) a plain contenteditable, (2) a bare unmodified CodeMirror 6 EditorView at top level, (3) the same nested inside another editable — typing recieve here into each marks only (1). The CM-driven hosts (2)/(3) are never underlined and the context menu reports no misspelled word.
The marker is never created, as opposed to created-then-wiped: replacing a text node/line after typing leaves an existing marker intact. And since only genuinely typed text is marked (attribute toggles / blur-refocus never trigger a re-check), the miss never recovers.
Why this looks Electron-side, not Blink or CodeMirror: the identical repro page opened in plain Google Chrome 152.0.7977.82 (Linux, fresh en-US profile) spellchecks all three boxes, including both CodeMirror editors. The CodeMirror maintainer also could not reproduce on Chromium 152 (Linux): https://discuss.codemirror.net/t/9886. Same Chromium 152 engine, divergent outcomes — the difference is Electron's spellchecker integration.
A plain contenteditable that mimics CM's per-keystroke DOM work (replacing the edited text node or the whole line, re-asserting the selection, synchronously or on rAF) is still checked fine — so it is specifically the live CodeMirror 6 editing host that Electron's after-typing marking pass never services.
Testcase Gist URL
https://gist.github.com/mauriciolongo/daeff5511fdc9ea402506a917f1a83e5
Additional Information
The gist is standalone HTML with no application code (unmodified @codemirror/view 6.43.1 bundled inline). Load it in a BrowserWindow with the builtin spellchecker enabled and type recieve here in each box: the plain box squiggles, both CodeMirror boxes stay clean. The same file opened in plain Chrome 152 squiggles all three.
Source: electron/electron