I have an li:
<li _ngcontent-c21="" class="accordion li" tabindex="0" aria-expanded="true">
Which I have tabbed to. document.activeElement is in fact this element. However,
document.activeElement.matches(':focus')
false
and to make matters even slightly more bizzare:
document.activeElement.focus()
undefined
document.activeElement.matches(':focus')
false
What is going on here? (this is chrome, btw)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…