This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
currently focused element lost in ng-click handler #5010
Closed
Description
For example, I want to get the currently focused element.
Template:
<input type="text" />
<a href="#" ng-click="gotClicked()">click me to see which element is focused</a>
Controller:
...
$scope.gotClicked = function() {
console.log(document.activeElement);
};
...
Try focusing on the text input and then click the link. The text input should be logged to the console, but it's not.