jamesallardice/Placeholders.js — pull request #48 by kristerkari (2013-10-29 16:48:19+00:00)
Title: Avoid IE9 activeElement of death

I was testing this polyfill on IE9 and noticed that IE was throwing "SCRIPT16389: Unspecified error". This only happened when I used an iframe to load the page that had the polyfill in use.

Turns out that the error gets thrown if `document.activeElement` is asked inside an iframe while the page is loading. jQuery already fixed this, so I use the same fix for placeholders.js and after that the page started working normally.

More info:
http://bugs.jquery.com/ticket/13393
https://github.com/jquery/jquery/commit/85fc5878b3c6af73f42d61eedf73013e7faae408