Saturday, November 24, 2007

How To Fix Safari's Silly New Textarea Alert

Safari 3 improves over Safari 2 in many ways, but it totally sucks ASS in one way: if you fill out a text area field on a form and then navigate away from the page or close the window, it pops up an aggravating little alert to make sure you really wanted to do that. Apple added this because they were apparently unaware that adults use OS X too.

Just kidding. I don't know why they did it. I do know it makes using nifty auto-submitting Ajax apps a pain in the ass in Safari, where before life was good. Luckily this is really easy to fix.

First you do this:

sudo mate /Applications/

(Assuming you use TextMate.)

And then you do this:

And then, if Safari works like any sane person would expect it to, you have me to thank.

(However, if your computer suddenly explodes, it was all your fault. I am not an Apple developer, or a lawyer. Or a tuna casserole, but hopefully you knew that.)

Update: Jack Nutting told me that there's a pretty good chance you can do it an easier way:

defaults write DebugConfirmTossingUnsubmittedFormText false

and adds that "the advantage of using the defaults command (if it works) is that the setting will stick in your user account even when new versions of Safari are released." As far as I can tell, it worked, although I guess we'll have to wait til the next Safari upgrade to be sure.