Which browsers support document.activeElement?
Asked Answered
T

2

47

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?

Towards answered 15/3, 2011 at 21:40 Comment(0)
C
50

document.activeElement is supported by IE6+, FF3+, Safari 4+, Opera 9+, Chrome 9+. (FF2, Saf3 don't support this property)

Capricorn answered 16/3, 2011 at 9:36 Comment(4)
Where do you find out such things, except on Stack Overflow? I didn't find this on quirksmode or MDN.Campfire
You can find it here: developer.mozilla.org/en/DOM/…Coenosarc
Opera 9.6+ (not 9+), Chrome 2+ (the same WebKit version 530 as in Safari 4)Bushel
Found this helpful site: caniuse.com but unfortunately does not have an entry for activeElement.Frill
U
1

It still doesn't work on WebKit based browsers in xhtml page see https://bugs.webkit.org/show_bug.cgi?id=63922

Uphemia answered 23/1, 2014 at 17:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.