From f60c4f3ffd0a12a471ad606bd1fae19f071f9154 Mon Sep 17 00:00:00 2001 From: Viktor Lidholt Date: Tue, 20 Oct 2026 08:35:23 +0200 Subject: [PATCH] fix(web): keep Grammarly out of every app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 and , 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 --- specs/01-architecture.md | 7 +++++++ wonky_drive/web/index.html | 30 ++++++++++++++++++++++++++++-- wonky_sheets/web/index.html | 30 ++++++++++++++++++++++++++++-- wonky_slides/web/index.html | 30 ++++++++++++++++++++++++++++-- wonky_write/web/index.html | 30 ++++++++++++++++++++++++++++-- 5 files changed, 119 insertions(+), 8 deletions(-) diff --git a/specs/01-architecture.md b/specs/01-architecture.md index e741187c..f676de84 100644 --- a/specs/01-architecture.md +++ b/specs/01-architecture.md @@ -475,6 +475,13 @@ development) from one origin; there is no separate host app. source `icons/og.webp`): absolute, as crawlers need, and versioned in its name because `/web/` is served as immutable — a new image gets a new name. The legal pages carry the same tags with their own `og:url` and canonical link. +- **No Grammarly**: the apps check spelling themselves (`wonky_spellcheck`), and Grammarly's + overlays on Flutter's hidden text fields interfere with editing. Each app's `web/index.html` + opts out: `data-gramm="false" data-gramm_editor="false" data-enable-grammarly="false"` on + `` and ``, and an inline script puts the same attributes on every `input`, + `textarea` and `contenteditable` that Flutter adds (MutationObserver) and on the focused field + (capturing `focusin`, which runs before the extension's own handler). A new app's + `index.html` copies the attributes and the script. - **Development**: the apps are declared in `serverpod: flutter_apps:` in the server pubspec (aliases `drive`, `write`, `sheets`, `slides`; `path: ../wonky_`, `target: lib/driver.dart`, fixed `web-port`s so the origins are stable for diff --git a/wonky_drive/web/index.html b/wonky_drive/web/index.html index aa7db196..9943b456 100644 --- a/wonky_drive/web/index.html +++ b/wonky_drive/web/index.html @@ -1,5 +1,5 @@ - +