Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't edit github input field with external editor #3609

Open
chep opened this issue Feb 21, 2025 · 1 comment
Open

Can't edit github input field with external editor #3609

chep opened this issue Feb 21, 2025 · 1 comment
Labels
bug good-first-issue Marks a good issue for first-time contributors.

Comments

@chep
Copy link

chep commented Feb 21, 2025

Describe the bug
I'm using emacs client as external editor. When trying to edit an input on github.com, emacs client is started, I can edit and save the temp file but then the input is not updated and the temp file is deleted (so edited text is lost).
edit-with-external-editor works on other websites.

Precise recipe to reproduce the issue
Go to any github project, try creating an issue for example, give focus to the description input, call edit-with-external-editor, modify the text, save, quit (C-x # for emacs client).

For website-specific issues:
Can you reproduce this issue with Epiphany / GNOME Web (https://wiki.gnome.org/Apps/Web)?

It works with firefox and ghost text.

Information

  • OS name+version: up to date archlinux
  • Graphics card and driver: GeForce GTX 1060 with xf86-video-nouveau 1.0.18-1
  • Desktop environment / Window manager name+version: sway version 1.10.1
  • Installation method (Flatpak, Guix, package manager, build from source): pacman package manager
  • Output of nyxt --system-information:
Nyxt version: 3.12.0
Renderer: GI-GTK
Operating system kernel: Linux 6.13.2-arch1-1
Lisp implementation: SBCL 2.4.9 (Dynamic space size: 3221225472)
Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-GI-GTK :NYXT-GTK :NYXT-3.12 :NYXT-3 :NYXT-3.12.0
 :CLIPBOARD-CONTENT-METHOD :SWANK :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS
 :FSET-EXT-STRINGS :SBCL+SAFE-STANDARD-READTABLE :NAMED-READTABLES :GLOBAL-VARS
 :CL-FAD :LPARALLEL :21BIT-CHARS :CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE
 :CL-UNICODE :CL-JSON-DOUBLE-FLOAT-IS-SUBSUMED
 :CL-JSON-SINGLE-FLOAT-IS-SUBSUMED :CHUNGA :FLEXI-STREAMS :CL-PPCRE :WEBKIT2
 :WEBKIT-2.46.2 :WEBKIT-2.46 :WEBKIT-2 :WEBKIT2-CORS-ALLOWLIST
 :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING :WEBKIT2-MUTE :WEBKIT2-EMOJI
 :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22 :GTK-3-20 :GTK-3-18 :GTK-3-16
 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6 :GTK-3-4 :GTK :GDK-3-22
 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12 :GDK-3-10 :GDK-3-8 :GDK-3-6
 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF :CLOSER-MOP :GLIB-2-30 :GLIB-2-32
 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40 :GLIB-2-42 :GLIB-2-44 :GLIB-2-46
 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54 :GLIB-2-56 :GLIB-2-58 :GLIB
 :BORDEAUX-THREADS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS
 :LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE
 CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI
 CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO
 :CL-JSON-CLOS :CL-JSON :SBCL-USES-SB-ROTATE-BYTE CHIPZ-SYSTEM:GRAY-STREAMS
 :THREAD-SUPPORT :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
 :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT
 :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN
 :PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS
 :SB-THREAD :SB-UNICODE :SBCL :UNIX)

ASDF version: 3.3.1
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY)
Critical dependencies: (/build/nyxt/src/_build/cl-cffi-gtk/gtk/cl-cffi-gtk.asd
 /build/nyxt/src/_build/cl-gobject-introspection/cl-gobject-introspection.asd
 /build/nyxt/src/_build/cl-webkit/webkit2/cl-webkit2.asd)
@aadcg aadcg added bug good-first-issue Marks a good issue for first-time contributors. labels Feb 21, 2025
@aadcg
Copy link
Member

aadcg commented Feb 21, 2025

Since it can't be reproduced for all input elements and URLs, it is probably related to the JS logic.

I'm sure lurkers are able to debug and fix it. There's a hint in the sources.

;; BUG: Fails when the input field loses its focus, e.g the DuckDuckGo search
;; bar.  A possible solution is to keep track of the last focused element for
;; each buffer.
(define-parenscript select-input-field ()
  (let ((active-element (nyxt/ps:active-element document)))
    (when (nyxt/ps:element-editable-p active-element)
      (ps:chain active-element (select)))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good-first-issue Marks a good issue for first-time contributors.
Development

No branches or pull requests

2 participants