nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

vi mode: Can't unfocus text input on website

Open MaxGyver83 opened this issue 9 months ago • 4 comments

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%))))
  • Start Nyxt and open a web page that contains a text input.
  • Focus text input with Alt+i.
  • Pressing Esc switches to normal mode.
  • Pressing Esc again has no effect.

MaxGyver83 avatar Sep 27 '23 19:09 MaxGyver83

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

MaxGyver83 avatar Sep 28 '23 20:09 MaxGyver83

Seems cumbersome, but yes.

jmercouris avatar Sep 28 '23 20:09 jmercouris

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

jmercouris avatar Sep 28 '23 20:09 jmercouris

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.

aartaka avatar Nov 29 '23 13:11 aartaka