iron-autogrow-textarea icon indicating copy to clipboard operation
iron-autogrow-textarea copied to clipboard

Simplify methods used to compute textarea size

Open CTOJoe opened this issue 8 years ago • 2 comments

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 avatar Mar 02 '16 04:03 CTOJoe

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.

CTOJoe avatar Mar 02 '16 05:03 CTOJoe

@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?

intcreator avatar Jun 14 '17 04:06 intcreator