mathiasbynens/jquery-visibility — pull request #5 by SujayKrishna (2012-12-19 10:38:06+00:00)
Title: [IE9] Fix for JavaScript issue that happens when a focus event is triggered

Checking if `originalEvent` is not `undefined`, to avoid errors from triggered events for which `originalEvent` is `undefined`.

Further Information from http://bugs.jquery.com/ticket/8055

The Event-object documentation says:
> Certain native events may have special properties that can be accessed as properties of the event.originalEvent object.

The trigger() documentation (.focus() is short for .trigger("focus")) says:
> Although .trigger() simulates an event activation, complete with a synthesized event object, it does not perfectly replicate a naturally-occurring event.

As triggering focus with .focus() isn't a native event, the originalEvent property can't available.

Test Case: http://jsfiddle.net/jitter/nTCXz/