Preserve focus

When re-focusing page content, return focus to element that was active before blur, instead of root element.

Autor
myf
Dnevne instalacije
0
Ukupnih instalacija
23
Ocjene
0 0 0
Verzija
1.0
Stvoreno
14.06.2021.
Ažurirano
14.06.2021.
Licenza
N/A
Primjenjuje se
Sve stranice

This always drove me nuts: having focused element in mid-page and switching away from the page (to URL bar for example), browser gives me zero means to quickly return to same element without painfully tabbing again.

This super simple script fixes it: when returning focus to the page, it moves it last focused element.

(I think this is what browsers should do by default.)