Well on top of that, while I'm bitching about Safari, there's another limitation with forcing focus. In general, Safari refuses to allow itself to grab focus overall; that is, to grab focus on a desktop application basis. That's done by calling the window.focus()method. IE is generally delighted to push itself in front of other desktop windows. Firefox will do it if the user's configured it to do so. The WebKit browsers, however, are uncooperative. That in and of itself doesn't really bother me; there are few cases where I really feel that's justified, and windows that raise themselves more often than not annoy me to the point of a killin' rage.
This sample illustrates the problem. (It's not very interesting in browsers other than Safari, of course.) If you visit that page and click the "Click me" button, you'll get a pop-up. Dismiss it and then do nothing. Nothing will happen when the page posts a log message indicating that it has tried to force focus. Now, click the "Click me" button again, and again dismiss the pop-up. This time, right after the pop-up goes away, click anywhere in the page (not the input field of course). That click should bring Safari to the foreground, so to speak, and then after a couple seconds the attempt to force focus will work, and the input field will get that irritating fuzzy blue border.