Orange is my favorite color

Pretend you have a few thousand lines of Javascript that leverages Ext. It works great in some browsers but in other browsers it just doesn’t work. Nada. It fails silently. And the completely useless choad these vendors pass off as a Javascript debugger gives you zero feedback. Imagine that, despite going bald, you managed to find the few remaining hairs attached to your head, pull them out and set them on fire.

Now pretend that changing all of your spaces to tabs fixes the problem.

You can stop pretending, because that’s what the solution was after last three days of debugging WebKit-powered Safari 3.2.1 and Chrome 1.0.

No, not a bug. Not a typo. Not a missing semi-colon. No, too many spaces. Because you know, they are in short supply!

I can’t tell you why. All I can tell you is I hate WebKit and especially Safari.

Now if you do the happy dance every time Steve Jobs blows his nose and you have a slightly masochistic side to you, you are welcome to explore the diff between the files that work in FF/IE7 but not Safari/Chrome and the one that works in all four.

To be clear, the single operation I performed between these two versions was a regular expression in Eclipse to change “[ ]{4}” into a tab character. Nothing more, nothing less.

In the mean time, I’m looking for my sanity. If you find it, please let me know in the comments.


  1. Justin Carter said:

    on December 18, 2008 at 4:22 pm

    Damn… That hurts… I don’t even know how you would begin to think that converting the spaces to tabs would have any effect, let alone find that it was the solution :P I think you’ve earned a long weekend – take Friday off!

  2. Rik said:

    on December 18, 2008 at 4:29 pm

    I understand your complaints. But instead of complaining in your little part of the Web, have you filed a bug for that ? for reports. Testcases are very appreciated. If you don’t want to create an account, send me an email with some details.

    This way, you can improve interoperability and save the web ;) After all, it’s the “giving presents” period of the year.

  3. brian said:

    on December 18, 2008 at 4:44 pm

    @Rik – thanks for dropping in – I just solved this about an hour ago and when my blood pressure returns to normal, I do plan to file a bug report. I try to be a good netizen so despite my Hulk-like flash of anger (some of which is unfairly directed at Webkit), I will happily contribute to debugging and getting it fixed.

    update – filed as bug #22927.

  4. Stacey said:

    on December 19, 2008 at 7:06 am

    Hate to break the news, but I am running Chrome 1.0 here, and I have a page that uses JS, in particular MooTools, and my script uses spaces for indenting and it works fine… You have other issues.

  5. Orange is my favorite color » Blog Archive » How to bypass cross-domain restrictions when developing AJAX applications said:

    on December 27, 2008 at 12:09 pm

    [...] There is a hack for Firefox but that doesn’t help you with IE, Safari or Chrome. We started out this way but when it came time to deploy we found issues with Safari and Chrome. [...]

{ RSS feed for comments on this post}