A1rPun
A1rPun

Reputation: 16857

Getting the active element within ExtJS?

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

Answers (2)

A1rPun
A1rPun

Reputation: 16857

Thanks to @sra for this solution:

let activeComponent = Ext.get(Ext.Element.getActiveElement());

Upvotes: 14

user1636522
user1636522

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

Related Questions