Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Simplify methods used to compute textarea size #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CTOJoe
Copy link

@CTOJoe CTOJoe commented Mar 2, 2016

Updates the underlying textarea height to auto thereby updating scrollHeight to a computed value upon change. If the texarea value is not empty, an explicit height is applied to the textarea using the computed scrollHeight. This commit also removes value mirroring.

Updates the underlying textarea height to `auto` thereby updating scrollHeight to a computed value upon change. If the texarea value is not empty, an explicit height is applied to the textarea using the computed scrollHeight. This commit also removes value mirroring.
@CTOJoe
Copy link
Author

CTOJoe commented Mar 2, 2016

This seems to also address and perhaps resolve issue #32. Wrapped lines appear to work more reliably when measuring the textarea instead of a mirror.

@notwaldorf notwaldorf self-assigned this Apr 14, 2016
@intcreator
Copy link

@notwaldorf perhaps this will fix the issue I opened (#107). I'm close to creating my own autogrowing text area at this point but this PR looks promising. I think the original hacks (creating an invisible div and messing around with position a ton) are limiting our ability to style this element. Do you want to look more into this? Do you need help upgrading this PR to 2.0? Should we scrap it and rethink the resizing a different way?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants