<!DOCTYPE html>
<!-- ========================================== kroc camen of camen design ============================================= -->
<title>blog · Ode to Textarea</title>
<link rel="stylesheet" type="text/css" href="/design/design.css" />
<meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=no" />
<link rel="alternate" type="application/rss+xml" href="/blog/rss" title="Just blog" />
<link rel="canonical" href="/blog/ode_to_textarea" />
<!-- =================================================================================================================== -->
<header>
	<h1><a href="/" rel="index">
		Camen Design
	</a></h1>
	<nav><ul>
		<li><a href="/">all</a></li>
		<li><a href="/projects">projects</a></li>
		<li><a href="http://forum.camendesign.com">forum</a></li>
	</ul><ul>
		<li><a href="/quote/">quote</a></li>
		<li><a href="/writing/">writing</a></li>
		<li><a href="/blog/" rel="tag">blog</a></li>
		<li><a href="/photo/">photo</a></li>
		<li><a href="/code/">code</a></li>
		<li><a href="/art/">art</a></li>
		<li><a href="/link/">link</a></li>
		<li><a href="/poem/">poem</a></li>
		<li><a href="/audio/">audio</a></li>
	</ul><ul>
		<li><a href="/web-dev/">web-dev</a></li>
		<li><a href="/annoyances/">annoyances</a></li>
		<li><a href="/eve/">eve</a></li>
		<li><a href="/code-is-art/">code-is-art</a></li>
		<li><a href="/inspiration/">inspiration</a></li>
		<li><a href="/windows/">windows</a></li>
		<li><a href="/gift/">gift</a></li>
		<li><a href="/gaming/">gaming</a></li>
		<li><a href="/mac/">mac</a></li>
		<li><a href="/osnews/">osnews</a></li>
		<li><a href="/c64/">c64</a></li>
		<li><a href="/linux/">linux</a></li>
	</ul>
	<a rel="previous" href="/blog/rss_a_reply">
		older article →
	</a><a rel="next" href="/blog/where_i_like">
		← newer article
	</a></nav>
</header>
<!-- =================================================================================================================== -->
<article><header>
	<!-- date published or updated -->
	<time pubdate datetime="2011-01-19T23:31:00+00:00">
		<sup>11:31<abbr>pm</abbr> • 2011</sup>
		<abbr title="January">Jan</abbr> 19
	</time>
	<!-- categories -->
	<ul>
		<li><a href="/blog/ode_to_textarea" rel="bookmark tag">blog</a></li>
		<li><a href="/annoyances/ode_to_textarea">annoyances</a></li>
		<li><a href="/web-dev/ode_to_textarea">web-dev</a></li>
	</ul>
	<!-- licence -->
	<small>
		<a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_GB">c</a>
		share + remix
	</small>
</header>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<section>
<h1>Ode to Textarea</h1>
<aside>
	Heavily inspired by <a href="http://web.archive.org/web/20050816051837/http://www.whytheluckystiff.net/2004/05/20.html" rel="external">“<cite>Textarea, you are a sunken nothing</cite>”</a>
</aside>
<p>
	<strong>Textarea, how do I hate thee?</strong><br />
	Let me count the ways…
</p>
<dl>
	<dt>Undon’t:</dt>
	<dd>
		<p>
			In Firefox, the text selection API is <em>so</em> broken, <em>so</em> useless that developers must
			replace the whole text of the textarea in order to insert something at the insertion point. The
			effect works as far as inserting, but it kills the undo, meaning that when you do an undo, the
			whole text gets selected.
		</p><p>
			This has been like this since Firefox 1.0 and likely long, long before in the days of Netscape.
			This is failure on a 400 million user scale. <em>How</em> does this slide? Does <em>nobody</em> in
			Mozilla use a textarea, ever, never, not even once a day? IE has never had this problem. It has a
			proprietary text-selection API, sure, but at least it works. And <code>contentEditable</code> and
			<code>XMLHTTPRequest</code> eventually became standards, so there’s hope yet.
		</p>
	</dd>
	<dt>Search and Replace:</dt>
	<dd>
		<p>
			Even Notepad supports this. Why, not only in 2011, but <em>fifteen</em> years after textarea was
			added to HTML 2.0 and terabytes upon terabytes of text have been entered into it, has no browser
			vendor ever thought at any point that they should take a day to implement search and replace? This
			is procrastination on an epic scale. What the crap could distract an entire industry for 15 years?
		</p><p>
			Imagine Microsoft had not yet gotten around to implementing search and replace in Word yet.
		</p><p>
			I use VB6 (12 years old) when I need to code a simple native applications for Windows, and even
			VB6 can get this right. Hang your heads in shame, browser vendors.
		</p>
	</dd>
	<dt>Stop making me rush:</dt>
	<dd>
		<p>
			You know why I write my articles in a proper text editor on an OS, instead of a textarea in a web
			form? Because for the last 15 years I have had it drummed—nay pummelled—into me that textarea
			is not to be trusted with valuable content. We have become conditioned to write our thoughts out
			in one sitting, as quickly as possible, and submit. <em>Nobody</em> works on an article for a
			month in a textarea.
		</p><p>
			Developers design web sites around this very notion that we must blurt out our intentions as
			quickly as possible and hurry on to the next page before the goblins break down the door.
		</p><p>
			Imagine a web where I could work on a lengthy, reasoned comment to a blog post over a couple of
			days. Sure, I <em>could</em> do that anyway—nothing is preventing me—writing the text in an
			editor and copying the text to the web, but people don’t. The design of web sites is incredibly
			powerful and suggestive and textarea throws us into a blind panic every single time.
		</p><p>
			Comments on the web suck in part because textarea sucks.
		</p><p>
			Sure many web browsers have session restore. Do you trust it? No, of course not. Do you copy your
			text before you press submit in case the web site you are using is so badly programmed it errors
			and either kills your text? Or the back button does.
		</p>
	</dd>
	<dt>Style:</dt>
	<dd>
		<p>
			Why has this not been fixed in all these years? Sod existing content, a textarea being a few
			pixels out of place is not going to kill anybody. <small>(I would like to see that police
			repot)</small>
		</p>
		<img src="/blog/ode_to_textarea/firefox_fail.png" alt="Screenshot of two input fields and a textarea in Firefox, the textarea has a different border" width="349" height="224" />
		<p>
			Incredibly, only Opera gets this right. Seems like they stopped to question the stupidity of
			blindly copying everybody else’s mistake.
		</p>
		<img src="/blog/ode_to_textarea/opera_win.png" alt="Screenshot of two input fields and a textarea in Opera, they all share the same style" width="317" height="220" />
	</dd>
</dl>

<hr />

<p>
	<strong>I don’t want an all singing, all dancing <em>replacement</em> for the textarea.</strong> I don’t want
	rich text formatting. I don’t want design mode and la-de-da hot new features. Even with all of these things,
	people will still need to <em>just type</em> some plain text. These features can never replace textarea, they will
	only offer an alternative.
</p><p>
	Browser vendors, stop for just one minute to realise that chasing after a never ending feature set has left you
	blind to the wake of usability failure you have left unfixed behind you for the last 15 years.
</p><p>
	If you want to add something to textarea, don’t wait for a specification. <em>Nobody</em> is interested. Don’t
	ask for permission, ask for forgiveness. Use vendor prefixes and just go <em>mad</em>. Full screen edit? Speech
	dictation? Syntax highlighting? bbcode helpers / autocorrect? Load / save to file? Inline translation? Detach and
	float so you can scroll and compare text? If you think it’ll help somebody. Standards can be worked out later once
	you have something so compelling everybody else just <em>has</em> to implement it.
</p><p>
	A billion lines of JavaScript will not solve this problem. It lies squarely with browser vendors, not authors. No
	amount of JavaScript can integrate textarea with the OS better. No amount of JavaScript will fix all the textareas
	on all the pages in the web.
</p><p>
	Fix textarea now. Not later. Not after you’ve shipped some other constantly changing HTML5 feature. Not when
	someone else does so first. Now. Please accept the responsibility and the scale of the damage your lackadaisical
	attitude has wrought.
</p><p>
	In centuries to come, a teacher will be showing children a graph of historical life expectancy and a child will
	raise their hand and ask what that little uptick is in the middle, and the teacher will reply “that’s the year
	when browsers fixed the textarea”.
</p>
</section>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</article>
<footer>
	<nav><a href="http://forum.camendesign.com">‹ Discuss this in the Forum ›</a></nav>
		
	<a href="mailto:kroc@camendesign.com">kroc@camendesign.com</a>
	<nav>view-source:
		<a href="/blog/ode_to_textarea.rem">Rem</a> •
		<a href="/blog/ode_to_textarea.html">HTML</a> •
		<a href="/design/">CSS</a> •
		<a href="/.system/">PHP</a> •
		<a href="/.htaccess">.htaccess</a>
	</nav>
	<form method="get" action="https://duckduckgo.com">
		<input type="hidden" name="sites" value="camendesign.com" />
		<input type="search" name="q" placeholder="search…" />
		<input type="submit" value="Go" />
	</form>
</footer>
<!-- =================================================================================================== code is art === -->