Skip to content

fix(web): keep Grammarly out of every app - #23

Merged
vlidholt merged 1 commit into
serverpod:mainfrom
vlidholt:fix/disable-grammarly
Oct 20, 2026
Merged

vlidholt merged 1 commit into
serverpod:mainfrom
vlidholt:fix/disable-grammarly

Conversation

@vlidholt

Copy link
Copy Markdown
Contributor

Maintainer change, no board task.

Summary

Wonky Work checks spelling itself (wonky_spellcheck), and Grammarly's overlays on Flutter's hidden text fields interfere with editing. Grammarly is now turned off in Write, Sheets, Slides and Drive:

  • Whole page: data-gramm="false" data-gramm_editor="false" data-enable-grammarly="false" on <html> and <body> in each app's web/index.html.
  • Each field: Flutter creates its <input>/<textarea> elements on demand (under <flt-text-editing-host>, in the light DOM), so an inline script puts the same attributes on every input, textarea and contenteditable as it is added (MutationObserver), and on the focused field (capturing focusin, which runs before the extension's own focus handler).
  • specs/01-architecture.md §2.4 has a new No Grammarly item, including that a new app's index.html must copy the attributes and the script.

Test plan

  • Release build of Write (--wasm), sign-in page at http://localhost:8082/write/: <html>, <body> and all of Flutter's fields (email, password, hidden submit) carry the three attributes, including the focused field after clicking into the password box; no console errors
  • Check with the Grammarly extension installed (the agent's browser has no Grammarly)
  • No Dart changes (dart analyze / dart format not affected); Sheets, Slides and Drive got the identical index.html change but weren't built
  • Specs updated

🤖 Generated with Claude Code

The apps check spelling themselves, and Grammarly's overlays on Flutter's
hidden text fields interfere with editing. Each app's web/index.html opts
out: the data-gramm, data-gramm_editor and data-enable-grammarly "false"
attributes on <html> and <body>, and an inline script that puts them on
every input, textarea and contenteditable Flutter adds (MutationObserver)
and on the focused field (capturing focusin, ahead of the extension's
handler). Spec 01 §2.4 documents it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vlidholt
vlidholt merged commit 167f115 into serverpod:main Oct 20, 2026
41 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant