Skip to content

fix(web-components): handle spellcheck values in TextInput and TextArea - #36500

Open
John Kreitlow (radium-v) wants to merge 2 commits into
microsoft:masterfrom
radium-v:users/radium-v/wc-fix-spellcheck
Open

fix(web-components): handle spellcheck values in TextInput and TextArea#36500
John Kreitlow (radium-v) wants to merge 2 commits into
microsoft:masterfrom
radium-v:users/radium-v/wc-fix-spellcheck

Conversation

@radium-v

@radium-v John Kreitlow (radium-v) commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Previous Behavior

Browser support for propagating the global spellcheck attribute across shadow roots is inconsistent: Chromium and WebKit inherit it across the boundary, while Firefox does not.

TextInput converted non-string spellcheck property values to null, which could throw during attribute reflection. TextArea treated spellcheck as a boolean attribute, causing values such as spellcheck="false" to enable spell checking. These issues could leave the internal control with different behavior across browsers or after SSR hydration.

New Behavior

TextInput and TextArea explicitly propagate normalized, enumerated spellcheck values to their internal controls instead of relying on browser-specific shadow-root inheritance.

Boolean property values are preserved, nullish values safely remove the attribute, and TextArea synchronizes its default state during hydration. Coverage includes attribute and property updates, removal, defaults, CSR, and SSR across Chromium, Firefox, and WebKit.

Related Issue(s)

@radium-v
John Kreitlow (radium-v) requested a review from a team as a code owner August 3, 2026 16:42
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Pull request demo site: URL

Comment thread packages/web-components/src/text-input/text-input.base.ts
@radium-v
John Kreitlow (radium-v) force-pushed the users/radium-v/wc-fix-spellcheck branch from b4812b7 to 3f888b4 Compare August 5, 2026 15:40
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.

[Bug]: web-components TextInput spellcheck attr converter throws on null/undefined (null.toString)

2 participants