I am writing a placeholder directive using angularjs.
On the click handler I want to check if the element and document.activeElement are the same.
I tried to use $docuemnt.activeElement for that but it was always undefined. But when I used $document[0].activeElement I am getting the currently active element.
Is $document[0].activeElement is the right way to access the currently active element? Or am doing something wrong?