Skip to content

fix(editable-html-tip-tap): honor the spellCheck prop PIE-978 - #2331

Merged
CarlaCostea merged 2 commits into
developfrom
fix/PIE-978
Sep 3, 2026
Merged

fix(editable-html-tip-tap): honor the spellCheck prop PIE-978#2331
CarlaCostea merged 2 commits into
developfrom
fix/PIE-978

Conversation

@CarlaCostea

@CarlaCostea CarlaCostea commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

EditableHtml never read props.spellCheck, so the browser spellchecked the
editor regardless of what the caller requested. In extended-text-entry this
caused students to see red underlines even when spellcheck was disabled. The
Slate editor this replaced honored the setting, which is why 13.4.0 behaves
correctly.

Set spellcheck, autocorrect and autocapitalize through editorProps.attributes
so ProseMirror applies them to the contenteditable element. This allows
extended-text-entry to disable browser spellcheck when playerSpellCheckDisabled
is true or absent: its controller resolves the absent property to an explicit
spellCheck={false}. Callers that pass nothing keep the browser default, as they
did under slate, so authoring editors are unaffected.

editorProps also has to be pushed through setOptions when it changes. useEditor
only re-applies options automatically when called with an empty dependency
array, and this call site depends on charactersLimit, so changing the setting
on a mounted editor was otherwise inert.

Adds tests that drive the real TipTap editor and assert the resulting DOM
attribute for the supported spellCheck values and when it changes on a mounted
editor.
https://illuminate.atlassian.net/browse/PIE-978

EditableHtml never read props.spellCheck, so the browser spellchecked the
editor regardless of what the caller requested. In extended-text-entry this
caused students to see red underlines even when spellcheck was disabled. The
Slate editor this replaced honored the setting, which is why 13.4.0 behaves
correctly.

Set spellcheck, autocorrect and autocapitalize through editorProps.attributes
so ProseMirror applies them to the contenteditable element. This allows
extended-text-entry to disable browser spellcheck when playerSpellCheckDisabled
is true or absent: its controller resolves the absent property to an explicit
spellCheck={false}. Callers that pass nothing keep the browser default, as they
did under slate, so authoring editors are unaffected.

editorProps also has to be pushed through setOptions when it changes. useEditor
only re-applies options automatically when called with an empty dependency
array, and this call site depends on charactersLimit, so changing the setting
on a mounted editor was otherwise inert.

Adds tests that drive the real TipTap editor and assert the resulting DOM
attribute for the supported spellCheck values and when it changes on a mounted
editor.
…PIE-978

Re-applying the whole editorProps object through setOptions ran on every render
for callers that pass an inline onKeyDown, such as mask-markup's constructed
response, because the object identity changed each time. Push only the
attributes, keyed on the spellCheck value, so handleKeyDown keeps the closure it
was created with and setOptions runs only when spellcheck actually changes.
@CarlaCostea
CarlaCostea merged commit 2d84973 into develop Sep 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant