Feature Request: Block all keystrokes-to-website except when in insert mode
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 27k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
The option don't let pages steal the focus on load is helping against keyboard hijacking by websites such as yahoo.com . Pressing unmapped keys like 'e' in default config will not result in that letter being sent to the webpage's search box.
There are however some nasty websites such as yandex.ru/news that capture every input they can get their hands (or event listeners) on. Pressing unmapped keys like 'e' and even some mapped keys like 'c' in default config will result in that letter being stolen and sent to the webpage's search box.
It would be nice if vimium had an option to block that behavior in all cases except when insert mode is activated. Something like don't let pages steal the focus except when insert mode is activated
STEPS TO REPRODUCE
- Go to an over-engineered website: https://yandex.ru/news/story/EHkspert_rasskazal_mozhno_li_skryt_dannye_o_geolokacii_na_smartfone--0ca9d02ffd50dd2df5355a65be0321d6?lr=213&lang=ru&persistent_id=94292609&rubric=computers&from=rubric
- Press 'v' to enter caret mode ("no usable selection")
- Navigate to the beginning of the first paragraph using h,j,k,l
- Press 'v' again to get into visual mode
- Press 'w' to select the first word and watch as the search box steals your input
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Reproduce the behavior at the provided Yandex News URL, then trace the existing focus and insert-mode handling; done means page keystroke capture is blocked outside insert mode while insert-mode input still reaches the page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100