Repository navigation
fix(desktop): size the composer from CSS instead of a per-keystroke measure - #335
Open
raymondginger2018-sudo wants to merge 1 commit into
Open
raymondginger2018-sudo wants to merge 1 commit into
raymondginger2018-sudo wants to merge 1 commit into
Conversation
…easure The composer reset the textarea to `0px` and read `scrollHeight` on every keystroke to grow it — a forced layout in the input path. `field-sizing: content` with the existing min/max-height does the same job in CSS, so the effect now only restores the caret after a dictated transcript is inserted. Browsers without `field-sizing` keep the min-height and scroll, which is the graceful fallback rather than a broken layout. Tests: `vitest run` 440 passed on Node 25.2.1 (with `NODE_OPTIONS=--no-experimental-webstorage`, the Node 25/26 jsdom issue fixed separately); `tsc --noEmit` and `eslint .` clean.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The composer reset its textarea to
0pxand readscrollHeighton every keystroke to grow it — a forced layout in the input path.field-sizing: contentwith the existing min/max-height does the same job in CSS, so the effect now only restores the caret after a dictated transcript is inserted.Changes
desktop/src/features/execution/Composer.module.css—field-sizing: contenton the textarea (grows with the draft;max-height: 190pxstill caps it).desktop/src/features/execution/Composer.tsx— drop theheight = "0px"/scrollHeightmeasurement; keep the caret-restore logic for dictated text.Compatibility
field-sizing(pre-Baseline-June-2026) keep themin-heightand scroll — the graceful fallback, not a broken layout.Tests
vitest run→ 63 files / 440 tests passed on Node 25.2.1 (run withNODE_OPTIONS=--no-experimental-webstorage, the separate Node 25/26 jsdom fix);tsc --noEmitandeslint .clean.