Preserve focus

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

Tác giả
myf
Cài đặt hàng ngày
0
Số lần cài đặt
24
Đánh giá
0 0 0
Phiên bản
1.0
Đã tạo
14-06-2021
Đã cập nhật
14-06-2021
Giấy phép
N/A
Áp dụng cho
Tất cả trang web

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