Open whirm opened 3 years ago
Thank you for the kind words! I'm not sure why this isn't working! The command bound to page up invokes the following js:
"window.scrollBy(0, 0.9 * -window.innerHeight);"
could you try to see why that isn't working on those kinds of pages?
Actually, when in insert mode, I would expect the caret/text cursor to jump to the beginning/end of the editable area/line (not the window to scroll) like it does in other browsers like Epiphany, Firefox, Brave.
I just realized I didn't mention I'm using vi keybindings on the bug description. I just tried switching back to the default bindings and I can still reproduce it.
If you enter application-mode
, it will work. This is because the website captures these keybindings to do something special.
When in CUA or vi-insert-mode, pageup
and pagedown
are bound and Nyxt does not forward them to the webview. So instead of page-up-ing in the editable area, it page-ups the whole page.
This is by design. On master, we've added an option to vi-insert-mode to automatically enable application-mode
.
That said, we would not have this problem at all if we didn't bind pageup
and pagedown
in the first place. Looks like forwarding them to the webview "does the right thing".
Shall we unbind them then?
Shall we unbind them then?
+1
I think it would be the least surprising behavior.
Done with commit: cb9c2e35
This fixed pageup
and pagedown
but Home
and End
still don't work for me.
Thinking more about it, we should check if the active element is editable, e.g. with
document.activeElement.contentEditable;
in %clicked-in-input?
. I tried with (ps:@ document active-element content-editable)
but for some reason it always returns "inherit"
on me. Am I missing something?
Describe the bug When editing areas which use
contenteditable="true"
(as opposed to using aPrecise recipe to reproduce the issue
For website-specific issues:
Can you reproduce this issue with Epiphany / GNOME Web (https://wiki.gnome.org/Apps/Web)?
Nope, it works fine there.
Information
OS name+version: Debian SID
Graphics card and driver: i915
Desktop environment / Window manager name+version: Sway (Wayland)
How you installed Nyxt (Guix pack, package manager, build from source): Git (rev. 33212652f596bf58d77fd798f661afebd528faa7)
Information from
show-system-information
:ASDF version: 3.3.1 Critical dependencies: (/var/data/src/nyxt/nyxt/_build/submodules/cl-cffi-gtk/gtk/cl-cffi-gtk.asd /var/data/src/nyxt/nyxt/_build/quicklisp-client/dists/quicklisp/software/cl-gobject-introspection-20210124-git/cl-gobject-introspection.asd /var/data/src/nyxt/nyxt/_build/submodules/cl-webkit/webkit2/cl-webkit2.asd)
Quicklisp dist version: 2021-06-30 Quicklisp client version: 2020-01-04 Local project directories: (/var/data/src/nyxt/nyxt/_build/submodules/ /var/data/src/nyxt/nyxt/_build/quicklisp-client/local-projects/) Critical dependencies(#<SYSTEM cl-cffi-gtk / cl-cffi-gtk-20201220-git / quicklisp 2021-06-30>
<SYSTEM cl-gobject-introspection / cl-gobject-introspection-20210124-git / quicklisp 2021-06-30>
<SYSTEM cl-webkit2 / cl-webkit-20210630-git / quicklisp 2021-06-30>)