Pattern: Accessing active element with global
Issue: -
Avoid accessing the active element with a global. Use the ownerDocument
property on a node ref instead.
Example of incorrect code:
document.activeElement;
Example of correct code:
ownerDocument.activeElement;