Which browsers support document.activeElement?
13,679
Solution 1
document.activeElement is supported by IE6+, FF3+, Safari 4+, Opera 9+, Chrome 9+. (FF2, Saf3 don't support this property)
Solution 2
It still doesn't work on WebKit based browsers in xhtml page see https://bugs.webkit.org/show_bug.cgi?id=63922
Related videos on Youtube
Comments
-
philfreo over 4 years
Which web browsers / versions have support for
document.activeElement
?This property lets you see which element is active / has focus.
Are there any main gotchas/difference between implementations?
-
ripper234 over 12 yearsWhere do you find out such things, except on Stack Overflow? I didn't find this on quirksmode or MDN.
-
etlovett about 12 yearsYou can find it here: developer.mozilla.org/en/DOM/…
-
Victor almost 12 yearsOpera 9.6+ (not 9+), Chrome 2+ (the same WebKit version 530 as in Safari 4)
-
nothingisnecessary about 11 yearsFound this helpful site: caniuse.com but unfortunately does not have an entry for activeElement.