While using FogBugz I noticed that textareas grow as you type in them. I thought this was quite cool and useful so I tried to mimic it for MagnaCRM.
FogBugz implementation was a little specific to their needs and I needed a more generalized way of doing it. This article was a good guide (it seems FogBugz solution is based on that too) and with some customization I managed to make it work as I wanted.
Of course the hardest part was making it behave nicely on all browsers. Although I am against browser detection techniques (when that’s possible), the code handles IE differently than all other browsers. Opera was a real pain and it’s not working as it should after all (the textarea grows at once to the maximum row number allowed by my script). It’s not really my fault, as Opera should not try so hard to pass as IE if it doesn’t really support the same features. Moreover I haven’t tried it on Safari, as I don’t have a Mac. I hope it handles it well!
Finally I should note that while I thought this would be a 5 minute hack, I ended up spending almost an entire day, trying various ways to achieve the desired effect and browser compatibility…








It was probably time well spent. User appreciate those types of features. I use a desktop app at work that while it was on version 2 it wouldn’t stretch it’s text areas and it drove me insane! Version 3 grows as you type and that aspect of the app is sooooooo much easier to work with.
Your users will appreciate it, at least on a subconscious level!
Comment by Michael Sica — August 26, 2005 @ 03:41
Dimitri, steile mou o,ti 8es na tsekarw se safari.
Comment by Panayotis Vryonis — August 26, 2005 @ 10:37
If you have a sample of this feature someplace I can get to it, I’d be more than happy to test it on my Mac. I can test all the Mac versions of the browsers: Safari, Firefox, Camino, and OmniWeb.
Comment by Jon Trainer — August 26, 2005 @ 22:27
Thanks you both for offering to test the script! I’ll probably send it to you, although I was thinking I have to buy a Mac sometime, maybe a Mac mini ;-)
Comment by Dimitris Giannitsaros — August 29, 2005 @ 00:06