Greasy Fork is available in English.

Preserve focus

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

作者
myf
日安装量
0
总安装量
24
评分
0 0 0
版本
1.0
创建于
2021-06-14
更新于
2021-06-14
许可证
暂无
适用于
所有网站

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.)