iron-autogrow-textarea
iron-autogrow-textarea copied to clipboard
Simplify methods used to compute textarea size
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.
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 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?