24 Apr 2009 7:58 AM #1
Elastic text areas - text areas the facebook way
Text Area the facebook way
Get your text areas to grow/shrink according to content
- No endless timer events, height is updated on key press
- You can define max an min height and height increment for the text area
- Can be applied directly to a HTML Text Area element, no need to create an Ext.Form.TextArea element
Demo & Download
24 Apr 2009 9:22 AM #2
Nice addon, i will try it on Ext core to see if it works the same way.
Haven't tryed yet, but i see in the code it triggers on keyup?, what happens if the default text in the text area is bigger than the textarea?, it resizes too?.
I mean if i put text in the textarea from lets say a DB and that text is bigger it gets resized too?.
Thanks for sharingJavier Rincón aka SysCobra
24 Apr 2009 9:36 AM #3
In my local machine it's working well with Ext 3
The text box will be resized if the default text is bigger / smaller than the initial text area height
29 Apr 2009 6:03 AM #4
Isn't this the same as the grow attribute textarea has?
29 Apr 2009 7:18 AM #5
29 Apr 2009 6:11 PM #6
different behaviours on Safari/Chrome and Firefox though.
in Safari/Chrome, typing an endlessly long string auto-wraps it; when string content height exceeds the height of the textarea, it doesn't grow.
in Firefox, typing the same endlessly long string doesn't auto-wrap it; textarea grows the moment a space or newline is introduced in the endlessly long string.
30 Apr 2009 6:31 AM #7
Thats a browser specific feature, some browsers do not split entire words
If you type the long string one letter after another it should resize because the resize code is triggered on key up
I guess an option could be added to allow the textarea to grow/shrink according to text width
30 Apr 2009 7:47 AM #8