Skip to content

Clear the cached textarea value on form reset - #58

Merged
tay1orjones merged 2 commits into
github:mainfrom
feritcemkahraman:fix/reset-value-cache
Oct 23, 2026
Merged

tay1orjones merged 2 commits into
github:mainfrom
feritcemkahraman:fix/reset-value-cache

Conversation

@feritcemkahraman

@feritcemkahraman feritcemkahraman commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

After a form reset, entering the same multiline value again leaves the textarea at its default height. Moving the pointer over it before typing can also make autosizing treat the cleared height as a manual resize. Clear both cached values during reset.

The dependency-free browser regression covers initial sizing, reset, pointer movement and retyping the same value. It failed before the fix and passed in Chromium afterward; ESLint and both TypeScript builds passed. The existing npm test script has no tests; Firefox/WebKit were not run.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Mouse movement after reset can still disable autosizing because the cached height is not cleared.

1 open issue
What changed in this PR

Addresses textarea autosizing when the same multiline value is re-entered after a form reset.

Changes:

  • Clears the previous-value cache on reset.
  • Adds a browser regression page and instructions for running it.
File Description
test/​reset.html Checks initial sizing, reset, and same-value re-entry.
src/​index.js Clears the cached value during form reset.
README.md Documents the browser regression page.

Review effort: Max

Comment thread src/index.js

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The cache resets address both reported failure paths, and no blocking issues remain.

No open issues 🎉

1 resolved since last review

Review effort: Max

@tay1orjones
tay1orjones merged commit 7441244 into github:main Oct 23, 2026
1 check 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.

3 participants