Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which browsers support document.activeElement?

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?

like image 541
philfreo Avatar asked Mar 15 '11 21:03

philfreo


People also ask

What is Document activeElement?

activeElement. The activeElement read-only property of the Document interface returns the Element within the DOM that currently has focus. Often activeElement will return a HTMLInputElement or HTMLTextAreaElement object if it has the text selection at the time.


1 Answers

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

like image 50
Andrei Avatar answered Sep 22 '22 01:09

Andrei