Closed Serhioromano closed 10 years ago
FYI, the functionality and code base has changed quite a bit since Issue #38 has landed so this would need to be rebased to be merged. The documentation here has been updated: http://bgrins.github.io/ExpandingTextareas/.
@domchristie any thoughts about this PR with regards to max height on the clone?
So what should I do? If i update will you accept or not? I took latest master.
I think it is required. because there is no way to control height. And if I add max-height
property, textarea stop growing but pre continue and white gap appear there.
I like the idea of taking the max-height
from the textarea itself, keeping any user-written CSS pretty dumb.
This would be pretty easy to port to the new code base: the resize
function has been replaced with the update
method (see: https://github.com/bgrins/ExpandingTextareas/blob/296f257a08e0db075c91c166b7792b6513327556/expanding.js#L81)
Would be good to have test coverage, too (I’d be happy to help with this)
So should I create new PR or not? I have tested it on my local project.
@Serhioromano yes, I like the idea of not needing the user to provide special CSS for this. There are some weird edge cases I can think of that involve changing the max-height
of the textarea with JS after updates have occurred would not fire, but I think those are minor enough that it is worth doing anyway.
Added PR #40.
It is very often needed to set maximum height to expand textarea. very clean way is simply set
max-height
css property to textarea. no need for additional parameters.This change will stop adding text to hidden
pre/div
if we have reached the height limit