Q&A: why does the Messenger:Mac window lose focus after I send my message?

I got this question today, and realised that I hadn't mentioned it here on this blog yet. The question is as follows:

i have just downloaded the new safari 4 beta. whenever i type something into msn, and press enter, i have to click back in the text box when i want to type my next message. this is very annoying

Yes, that is annoying! It's an issue with the version of WebKit that Apple shipped with the Safari 4 public beta. This issue was reported pretty much immediately after the Safari 4 public beta hit the streets, and the WebKit team fixed it quite quickly. To quote from their bug tracking system, this is the bug that was in WebKit:

During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.

So what do you do? You have a few options, none of which are optimal.

  1. Uninstall the Safari 4 beta (use the uninstaller that came with the DMG; if you don't still have it, you can redownload the Safari 4 beta to get the uninstaller), and reinstall Safari 3.
  2. Install a later build of WebKit. The Apple Developer Connection article working with the WebKit nightly builds is a great overview of what you need to do here. This obviously isn't for the faint-of-heart, so you need to be very comfortable with living on the bleeding edge of software development.
  3. Live with it until Apple releases an update to Safari 4 that uses a newer build of WebKit.

The first option is the one that I went with. I use Messenger much too much to be able to live with it, and I didn't feel like dealing with nightly builds of WebKit. I'm already using nightly builds of Entourage for EWS, not to mention [redacted] and [redacted], so I didn't want to add more complexity.


Edited 2009-05-26 at 16:09 to link to the ADC article.