When I press a key such as i or a or cc, which moves into insert mode, the cell contents get replaced by ‘NULNUL’ (presumably a visual representation of two NUL bytes):
I can get back to the previous state by undoing with u, but I have no way to edit the text without it being replaced by ‘NULNUL’ beforehand.
Notably, this bug is Firefox-specific. Google Chrome shows the expected behaviour.
Reproduce
pip install jupyterlab jupyterlab-vim
Start JupyterLab and open in Firefox
Open a notebook
Select any cell
Press i (or a, etc.)
Expected behavior
JupyterLab-Vim goes into insert mode at the selected place in the cell, without deleting the cell contents or adding any text.
Context
Python package version:
$ pip show jupyterlab-vim
Name: jupyterlab-vim
Version: 4.1.3
<rest omitted for concision>
Extension version:
$ jupyter labextension list
JupyterLab v4.2.0
/home/bradrn/Documents/<path-omitted>/.venv/share/jupyter/labextensions
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
@axlair/jupyterlab_vim v4.1.3 enabled OK (python, jupyterlab_vim)
Operating System and its version: Linux, EndeavourOS (i.e., almost identical to Arch Linux)
Browser and its version: Firefox Developer 126.0b9
Command Line Output
```
$ jupyter lab
[I 2024-05-15 14:22:03.994 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-05-15 14:22:03.998 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-05-15 14:22:04.002 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-05-15 14:22:04.207 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-05-15 14:22:04.222 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-05-15 14:22:04.224 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-05-15 14:22:04.225 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-05-15 14:22:04.226 LabApp] JupyterLab extension loaded from /home/bradrn/Documents/University/Saclay/PTCDA/.venv/lib/python3.12/site-packages/jupyterlab
[I 2024-05-15 14:22:04.226 LabApp] JupyterLab application directory is /home/bradrn/Documents/University/Saclay/PTCDA/.venv/share/jupyter/lab
[I 2024-05-15 14:22:04.227 LabApp] Extension Manager is 'pypi'.
[I 2024-05-15 14:22:04.237 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-05-15 14:22:04.238 ServerApp] Serving notebooks from local directory: /home/bradrn/Documents/University/Saclay/PTCDA
[I 2024-05-15 14:22:04.238 ServerApp] Jupyter Server 2.14.0 is running at:
[I 2024-05-15 14:22:04.238 ServerApp] http://localhost:8888/lab?token=afd89715296ef5b2500b496e894d86c6cb0dc8be2712df00
[I 2024-05-15 14:22:04.238 ServerApp] http://127.0.0.1:8888/lab?token=afd89715296ef5b2500b496e894d86c6cb0dc8be2712df00
[I 2024-05-15 14:22:04.238 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2024-05-15 14:22:06.408 ServerApp]
To access the server, open this file in a browser:
file:///home/bradrn/.local/share/jupyter/runtime/jpserver-25157-open.html
Or copy and paste one of these URLs:
http://localhost:8888/lab?token=afd89715296ef5b2500b496e894d86c6cb0dc8be2712df00
http://127.0.0.1:8888/lab?token=afd89715296ef5b2500b496e894d86c6cb0dc8be2712df00
[I 2024-05-15 14:22:06.747 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[I 2024-05-15 14:22:11.868 LabApp] Build is up to date
[I 2024-05-15 14:22:15.812 ServerApp] Kernel started: ce3b0ff7-0532-4062-a01c-5ab0379374bb
[I 2024-05-15 14:22:16.363 ServerApp] Connecting to kernel ce3b0ff7-0532-4062-a01c-5ab0379374bb.
[I 2024-05-15 14:22:16.375 ServerApp] Connecting to kernel ce3b0ff7-0532-4062-a01c-5ab0379374bb.
[I 2024-05-15 14:22:16.388 ServerApp] Connecting to kernel ce3b0ff7-0532-4062-a01c-5ab0379374bb.
```
There was no further output between here and when I shut down the kernel.
Web Browser Output
Language pack 'en_GB' not installed! [jlab_core.b207cc5f30e679038452.js:1:1580033](http://localhost:8888/static/lab/jlab_core.b207cc5f30e679038452.js?v=b207cc5f30e679038452)
Starting application in workspace: "default" [jlab_core.b207cc5f30e679038452.js:1:8982](http://localhost:8888/static/lab/jlab_core.b207cc5f30e679038452.js?v=b207cc5f30e679038452)
Deprecated shortcut selectors: ".jp-Notebook.jp-mod-commandMode :focus:not(:read-write)" was replaced with ".jp-Notebook.jp-mod-commandMode:not(.jp-mod-readWrite) :focus" in JupyterLab 4.1.1 (present in ".jp-NotebookPanel[data-jp-vim-mode='true'] .jp-Notebook.jp-mod-commandMode :focus:not(:read-write)")
The selectors will be substituted transparently this time, but need to be updated at source before next major release. [jlab_core.b207cc5f30e679038452.js:1:1486414](http://localhost:8888/static/lab/jlab_core.b207cc5f30e679038452.js?v=b207cc5f30e679038452)
Starting WebSocket: ws://localhost:8888/api/kernels/cf95fb06-390e-487f-9576-eef379396d0f
Description
When I press a key such as
i
ora
orcc
, which moves into insert mode, the cell contents get replaced by ‘NULNUL’ (presumably a visual representation of two NUL bytes):I can get back to the previous state by undoing with
u
, but I have no way to edit the text without it being replaced by ‘NULNUL’ beforehand.Notably, this bug is Firefox-specific. Google Chrome shows the expected behaviour.
Reproduce
pip install jupyterlab jupyterlab-vim
i
(ora
, etc.)Expected behavior
JupyterLab-Vim goes into insert mode at the selected place in the cell, without deleting the cell contents or adding any text.
Context
Command Line Output
``` $ jupyter lab [I 2024-05-15 14:22:03.994 ServerApp] jupyter_lsp | extension was successfully linked. [I 2024-05-15 14:22:03.998 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2024-05-15 14:22:04.002 ServerApp] jupyterlab | extension was successfully linked. [I 2024-05-15 14:22:04.207 ServerApp] notebook_shim | extension was successfully linked. [I 2024-05-15 14:22:04.222 ServerApp] notebook_shim | extension was successfully loaded. [I 2024-05-15 14:22:04.224 ServerApp] jupyter_lsp | extension was successfully loaded. [I 2024-05-15 14:22:04.225 ServerApp] jupyter_server_terminals | extension was successfully loaded. [I 2024-05-15 14:22:04.226 LabApp] JupyterLab extension loaded from /home/bradrn/Documents/University/Saclay/PTCDA/.venv/lib/python3.12/site-packages/jupyterlab [I 2024-05-15 14:22:04.226 LabApp] JupyterLab application directory is /home/bradrn/Documents/University/Saclay/PTCDA/.venv/share/jupyter/lab [I 2024-05-15 14:22:04.227 LabApp] Extension Manager is 'pypi'. [I 2024-05-15 14:22:04.237 ServerApp] jupyterlab | extension was successfully loaded. [I 2024-05-15 14:22:04.238 ServerApp] Serving notebooks from local directory: /home/bradrn/Documents/University/Saclay/PTCDA [I 2024-05-15 14:22:04.238 ServerApp] Jupyter Server 2.14.0 is running at: [I 2024-05-15 14:22:04.238 ServerApp] http://localhost:8888/lab?token=afd89715296ef5b2500b496e894d86c6cb0dc8be2712df00 [I 2024-05-15 14:22:04.238 ServerApp] http://127.0.0.1:8888/lab?token=afd89715296ef5b2500b496e894d86c6cb0dc8be2712df00 [I 2024-05-15 14:22:04.238 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 2024-05-15 14:22:06.408 ServerApp] To access the server, open this file in a browser: file:///home/bradrn/.local/share/jupyter/runtime/jpserver-25157-open.html Or copy and paste one of these URLs: http://localhost:8888/lab?token=afd89715296ef5b2500b496e894d86c6cb0dc8be2712df00 http://127.0.0.1:8888/lab?token=afd89715296ef5b2500b496e894d86c6cb0dc8be2712df00 [I 2024-05-15 14:22:06.747 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server [I 2024-05-15 14:22:11.868 LabApp] Build is up to date [I 2024-05-15 14:22:15.812 ServerApp] Kernel started: ce3b0ff7-0532-4062-a01c-5ab0379374bb [I 2024-05-15 14:22:16.363 ServerApp] Connecting to kernel ce3b0ff7-0532-4062-a01c-5ab0379374bb. [I 2024-05-15 14:22:16.375 ServerApp] Connecting to kernel ce3b0ff7-0532-4062-a01c-5ab0379374bb. [I 2024-05-15 14:22:16.388 ServerApp] Connecting to kernel ce3b0ff7-0532-4062-a01c-5ab0379374bb. ``` There was no further output between here and when I shut down the kernel.Web Browser Output