Safari Crasher

This code crashes Safari 2.0 (412), the build included in Mac OS X 10.4.1. I’ve no idea why. If you type something in the field and then click or tab away, Safari (or any other WebCore instance) instantly freezes and/or quits. But it doesn’t always happen the first time.

<input type="text" onblur="this.type='password';" onfocus="this.type='text';" />

View an actual crashing field (don’t if you have open tabs that you want to keep).

FireFox handles it just fine, though some internal JavaScript errors show up in the JavaScript Console. IE just complains of an error … it doesn’t know how to set the .type of an input type="text".

I should submit a WebCore bug, but I’ve never done that before. Looks like I have to search for the issue in BugZilla first.

Can anyone confirm this?

Trackback URL

  1. dbergey
    Andy Fowler
    11/07/2005 at July 11, 2005 @ 4:26pm Permalink

    Maybe Mac OS does something weirder w/ password fields, because I don’t even get any Javascript errors with Firefox 1.0.4. Correct on the IE errors, though.

  2. dbergey
    dbergey
    11/07/2005 at July 11, 2005 @ 4:32pm Permalink

    After I posted that, I realized that the FireFox JavaScript errors weren’t happening with the implementation in my post. They were internal anyway, something having to do with auto-complete. I still havent come up with a way to reliably do it in IE. When I swap fields out on onClick (by cloning the node, modifying the .type, and replacing it), the insertion point placement doesn’t carry over to the new field, thus rendering the field useless. Perhaps I should try using the mysterious IE bubbling?