It can be very annoying when something steals focus away from what you are doing. The worst case for me is typing, where, for example, another window opens and suddenly my keystrokes are being input into a new window.
Add a setting in Keyboard control panel called "Prevent lost focus when typing X quickly" with a slider.
I think that if this were implemented thoughtfully, (for example requiring a certain number of letters to be typed before it flags you as 'typing' and checking that you were typing into a text input area, not keyboard navigating, etc) it could be implemented without creating new issues. Having a setting for it allows different user preferences regarding this behavior.