atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.91k stars 414 forks source link

vi mode: Can't unfocus text input on website #3191

Open MaxGyver83 opened 1 year ago

MaxGyver83 commented 1 year ago

Describe the bug

Using vi key bindings, when I focus a text input on a web page with Alt+i, I'm directly in insert mode and can enter some text. But then I'm caught in this text input. How can I unfocus (without using the mouse)? Esc brings me to normal mode but never out of the text input.

Precise recipe to reproduce the issue

config.lisp:

(define-configuration buffer
  ((default-modes
    (pushnew 'nyxt/mode/vi:vi-normal-mode %slot-value%))))
MaxGyver83 commented 1 year ago

There is a way to unfocus:

  1. When in normal mode: Press i to switch to vi-insert-mode.
  2. C-z to activate passthrough-mode
  3. Esc to unfocus (will be passed to the document).
jmercouris commented 1 year ago

Seems cumbersome, but yes.

jmercouris commented 1 year ago

There must be a way we can make this work...!

aartaka commented 1 year ago

A simple option is to use Tab to move focus to the next interactive element. But yeah, more elegant Nyxt-side solution won't hurt.