On a page I have an Iframe that contains input boxes, and if I select one of those boxes in FireFox and use document.activeElement
, I get the IFrame. Thats okay, I just use that IFrame and get its contentDocument, save it, then do activeElement again and now I get the input box.
However, in Chrome and Safari, when I select one of the boxes inside the IFrame and do document.activeElement
, I get the body element. If I select an element outside the IFrame, document.activeElement
works perfectly.
How can I get the active element in my case?