activeElement Property

Retrieves the object that has the focus when the parent document has focus.
You can get the source index of the active element (object that has focus) on the page by doing the following:

CurrentSourceInd = Browser("Browser").Page("Page").Object.activeElement.sourceIndex

Now you can query the source index of any object on the page by doing the following:

SrcIdx =
Browser("Browser").Page("Page").WebEdit("q").GetROProperty("source_index")

You can then compare the two values to see if the WebEdit is the active element on the page that has focus. If the source index of the WebEdit is the same as the source index of the activeElement, then the WebEdit is the object that has focus.