4

If I put the focus on the url edit in chrome and then press tab, then run document.activeElement in my console I get:

<body tabindex="-1" aurelia-app="main">...</body>

Is there a way I can stop the body from getting the tab focus?

Vaccano
  • 78,325
  • 149
  • 468
  • 850

1 Answers1

0

As this answer:

Between leaving the old element and entering the new element the active element is indeed the document/body itself.

I found if you don't want the body element to get focus do this

<body onfocus="blur();">
Ayman
  • 117
  • 11