<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A different approach to elastic textareas</title>
	<atom:link href="http://leaverou.me/2009/11/a-different-approach-to-elastic-textareas/feed/" rel="self" type="application/rss+xml" />
	<link>http://leaverou.me/2009/11/a-different-approach-to-elastic-textareas/</link>
	<description>Thoughts on web design, web development and usability</description>
	<lastBuildDate>Sat, 04 Sep 2010 21:51:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Lea Verou</title>
		<link>http://leaverou.me/2009/11/a-different-approach-to-elastic-textareas/#comment-890</link>
		<dc:creator>Lea Verou</dc:creator>
		<pubDate>Tue, 29 Dec 2009 21:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://leaverou.me/?p=425#comment-890</guid>
		<description>Happy holidays everyone!

Steve, that&#039;s a quite clever idea. Have you tried it? I&#039;m afraid the flicker won&#039;t go away, since it will still have to check on every keystroke. Checking is what causes the flicker, not actually enlarging/shrinking it...</description>
		<content:encoded><![CDATA[<p>Happy holidays everyone!</p>
<p>Steve, that&#8217;s a quite clever idea. Have you tried it? I&#8217;m afraid the flicker won&#8217;t go away, since it will still have to check on every keystroke. Checking is what causes the flicker, not actually enlarging/shrinking it&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://leaverou.me/2009/11/a-different-approach-to-elastic-textareas/#comment-859</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Sun, 20 Dec 2009 16:15:59 +0000</pubDate>
		<guid isPermaLink="false">http://leaverou.me/?p=425#comment-859</guid>
		<description>re: Internet Explorer.

All you have to do is, when you detect the need to increase the size of the  textarea, INCREASE IT BY 4 LINES OR SO, INSTEAD OF 1!

Logically, you are doing the same thing a database does, by increasing the size of the .MDF file when data is flowing in. It performs the increase in chunks, and you can do the same, for IE , just use bigger chunks (I know, IE makes me hurl chunks too!! :) )</description>
		<content:encoded><![CDATA[<p>re: Internet Explorer.</p>
<p>All you have to do is, when you detect the need to increase the size of the  textarea, INCREASE IT BY 4 LINES OR SO, INSTEAD OF 1!</p>
<p>Logically, you are doing the same thing a database does, by increasing the size of the .MDF file when data is flowing in. It performs the increase in chunks, and you can do the same, for IE , just use bigger chunks (I know, IE makes me hurl chunks too!! <img src='http://leaverou.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Bonser</title>
		<link>http://leaverou.me/2009/11/a-different-approach-to-elastic-textareas/#comment-820</link>
		<dc:creator>Paul Bonser</dc:creator>
		<pubDate>Wed, 02 Dec 2009 01:11:38 +0000</pubDate>
		<guid isPermaLink="false">http://leaverou.me/?p=425#comment-820</guid>
		<description>Whoops, I guess a recent theme change I made broke some jQuery compatibility code that I wrote for WordPress (var $=jQuery;).

I&#039;ve fixed it now.</description>
		<content:encoded><![CDATA[<p>Whoops, I guess a recent theme change I made broke some jQuery compatibility code that I wrote for WordPress (var $=jQuery;).</p>
<p>I&#8217;ve fixed it now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lea Verou</title>
		<link>http://leaverou.me/2009/11/a-different-approach-to-elastic-textareas/#comment-801</link>
		<dc:creator>Lea Verou</dc:creator>
		<pubDate>Sat, 28 Nov 2009 18:49:45 +0000</pubDate>
		<guid isPermaLink="false">http://leaverou.me/?p=425#comment-801</guid>
		<description>Hi Paul,

Sorry for the late response, I didn&#039;t get an email notification (should look into that)

Your demo doesn&#039;t work (on firefox 3.5, I don&#039;t have the time to cross-test atm) :-(

Yeah, most elastic textarea scripts change the height, but this adds an extra layer of complexity to the script: determining the line-height in pixels, taking upon consideration the multiple factors that could affect that on different sites. Also, the reason for that flicker won&#039;t go away: it&#039;s that IE repaints more often than needed. We could just reduce it&#039;s severity, since we could test with smaller increments I guess. 

I did use the click event in the past for such things, but I recently started using the paste event since &lt;a href=&quot;http://www.quirksmode.org/dom/events/index.html#t018&quot; rel=&quot;nofollow&quot;&gt;it&#039;s support is fairly good&lt;/a&gt; (for the &quot;buggy&quot; FF implementation, see the details, it just fires it too much, but definitely less times than the click event is fired on a regular user interaction with a common UI!) and the click event is most of the time used for other things, so it makes a script unnecessarily slow (I still use the click event on certain occasions, depends on the particular case).</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>Sorry for the late response, I didn&#8217;t get an email notification (should look into that)</p>
<p>Your demo doesn&#8217;t work (on firefox 3.5, I don&#8217;t have the time to cross-test atm) <img src='http://leaverou.me/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Yeah, most elastic textarea scripts change the height, but this adds an extra layer of complexity to the script: determining the line-height in pixels, taking upon consideration the multiple factors that could affect that on different sites. Also, the reason for that flicker won&#8217;t go away: it&#8217;s that IE repaints more often than needed. We could just reduce it&#8217;s severity, since we could test with smaller increments I guess. </p>
<p>I did use the click event in the past for such things, but I recently started using the paste event since <a href="http://www.quirksmode.org/dom/events/index.html#t018" rel="nofollow">it&#8217;s support is fairly good</a> (for the &#8220;buggy&#8221; FF implementation, see the details, it just fires it too much, but definitely less times than the click event is fired on a regular user interaction with a common UI!) and the click event is most of the time used for other things, so it makes a script unnecessarily slow (I still use the click event on certain occasions, depends on the particular case).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Bonser</title>
		<link>http://leaverou.me/2009/11/a-different-approach-to-elastic-textareas/#comment-687</link>
		<dc:creator>Paul Bonser</dc:creator>
		<pubDate>Sun, 15 Nov 2009 23:21:41 +0000</pubDate>
		<guid isPermaLink="false">http://leaverou.me/?p=425#comment-687</guid>
		<description>I wrote something similar a while back.

http://probablyprogramming.com/2009/04/24/simple-textarea-auto-resizer/

It could possibly be made to not flicker in IE by changing the height instead of the rows attribute, possibly with some sort of animation so it happens more smoothly.

One other thing, I&#039;d suggest listening for a click event as well, because the &quot;paste&quot; event isn&#039;t recognized in several browsers.</description>
		<content:encoded><![CDATA[<p>I wrote something similar a while back.</p>
<p><a href="http://probablyprogramming.com/2009/04/24/simple-textarea-auto-resizer/" rel="nofollow">http://probablyprogramming.com/2009/04/24/simple-textarea-auto-resizer/</a></p>
<p>It could possibly be made to not flicker in IE by changing the height instead of the rows attribute, possibly with some sort of animation so it happens more smoothly.</p>
<p>One other thing, I&#8217;d suggest listening for a click event as well, because the &#8220;paste&#8221; event isn&#8217;t recognized in several browsers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
