Jacek Caban (@jacek) commented about dlls/mshtml/nsevents.c:
if(event->event_id == EVENTID_FOCUS || event->event_id == EVENTID_BLUR) { DOMEvent *focus_event;
if (node && doc != node->doc)
You may just move this condition to if statement and skip entire block if it doesn't match.