philc / philc/vimium

Highlighting an input field automatically exits manually-entered insert mode

Open
#2,373 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
27k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Activating insert mode works as expected, but once I highlight a text input field, vimium puts me back in normal mode.

https://github.com/philc/vimium/issues/2140 implies that under the hood, text input fields are actually handled as if the user is in input mode (which makes sense), but the user should probably stay in the previous mode (whether that's insert or normal) after deselecting the text input field.

It may be worth mentioning that I initially found this behavior while filling out an input form involving both text inputs and dropdown (HTML <select>) fields. With a dropdown field highlighted, vimium is presumably still in normal mode, so I can't, for example, type in "Ver" to search for "Vermont". Switching to insert mode before typing in the substring search does work, however. It's just that as soon as I tab to the next field, I'm forced back to normal mode, so if I tab back, I have to re-enter insert mode.

Arguably, these could be two separate issues:

1. Highlighting an input field forces the user to leave insert mode.
2. HTML <select> elements do not trigger vimium to enter insert mode.

Edit:
Google Chrome 54.0.2840.101 (Official Build) (64-bit)
Vimium v1.57

Edit 2:
The <select> fields work fine; I was just dealing with an exception on a specific site that had their own implementation of dropdowns.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior in Chrome by entering insert mode, highlighting a text input, and moving between fields. Trace the mode transition associated with text-input focus and selection; done when manually entered insert mode is preserved after highlighting or deselecting an input field, without regressing normal-mode behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.