-- Not duplicate! Since the other questions are outdated. Not duplicate with the asked question!!!!
this.elm.nativeElement.ownerDocument.activeElement
also
document.activeElement
gives me strangely enough the whole body.How can i just get the current focused element?
elm = type of ElementRef which is bound in my component's constructor.
from another question here: this.renderer.invokeElementMethod is also not callable since Renderer is now deprecated and Renderer2 does obviously not have that method anymore.
EDIT: This question answers this problem partially:
document.activeelement returns body
Between leaving the old element and entering the new element the active element is indeed the document/body itself.