📜 ⬆️ ⬇️

Another way to create a text field with a dynamically changeable height

I bring to your attention another way to create a text field with a dynamically adjustable height - Another TextArea Autogrow . I made it like a jQuery plugin, but whoever needs a “clean” solution without problems will be able to “untie” it. Previous solutions had tangible drawbacks, this is a high load on the processor, when printing or pasting, the “corner” in safari, they work differently in different browsers, and of twitching. I tried to get rid of all these minuses, as far as it turned out, to judge you.

The difference of this solution from the previous ones, in increased productivity and simplicity. Of the additional parameters only {timer: 100}, which is responsible for the frequency with which the field will be processed. You can put 200 or more for the minimum load on the processor, but this may cause some "delay" in the work. Different from the default padings and boarders in the text field are not yet supported, minHeight will also be added later.

Temporary page of the plugin http://figovo.com/ .

')

Source: https://habr.com/ru/post/41446/


All Articles