Prevent crashing on IE when in iframes

"Unspecified error" on document.activeElement when
running in an iframe in IE.