Reputation: 16857
Im trying to get the component that is active/focused at a given time. I already know that you can get a HTMLElement with the cross-browser javascript function document.activeElement
.
How can I cast this element to a Ext.Component or does ExtJs have a similar function?
Upvotes: 11
Views: 6725
Reputation: 16857
Thanks to @sra for this solution:
let activeComponent = Ext.get(Ext.Element.getActiveElement());
Upvotes: 14
Reputation:
Take a look at this : Ext.FocusManager. I have never used this feature, could you tell me if it fits with your needs?
Upvotes: 0