notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Keyboard shortcuts broken after following internal link

Open homeworkace opened this issue 1 year ago • 6 comments

Latest stable version, latest stable Firefox, Python 3.11. All keyboard shortcuts and most other mouse functions are broken. Cells cannot be run by keyboard or mouse. Attempting to duplicate or insert cells create empty ones somewhere unrelated. Attempting to delete these empty cells results in other cells being deleted instead. Resolved with reload.

To reproduce:

  1. Create markdown cell A as such:
This [word](#link) leads to cell B.
  1. Create markdown cell B as such:
<a name = 'link'></a>I am cell B.
  1. Ctrl + Enter both cells.
  2. Double-click on "word" in cell A.

homeworkace avatar Dec 27 '23 23:12 homeworkace

Thank you @homeworkace for opening this issue. Could you share which version of Notebook you are using? Do you have any enabled browser extensions that might interfere with content? Also, is this issue present with other browsers?

RRosio avatar Jan 02 '24 18:01 RRosio

Hi @homeworkace just following up with you, would you be able to provide the information requested above?

RRosio avatar Jan 09 '24 17:01 RRosio

Sorry for the inactivity, I'd posted this issue while I was attending to my coursework.

pip freeze shows that I'm using jupyter==1.0.0 and notebook==7.0.6.

I have extensions in Firefox but I don't believe they interfere with the notebook's operation.

  • Adblock Plus does not block any elements.
  • Honey has no integration with Jupyter.
  • Dark Mode is turned off.
  • There are no Tampermonkey scripts active on the notebook URL.
  • My VPN is not turned on.

I will test this in another browser and in another computer today or tomorrow, and will check back again with the results.

Edit: I closed the issue on accident. At the moment I'm still able to reproduce the bug in my current setup by following the steps above.

homeworkace avatar Jan 10 '24 08:01 homeworkace

This is on a clean Firefox instance launched with Selenium. After following the link (see URL bar), I'm unable to run the cell in the middle: image

On Chrome or Edge this bug does not happen. Using Python 3.12 to launch Jupyter (and using the same instance of Python as the kernel) I get the same results.

homeworkace avatar Jan 12 '24 12:01 homeworkace

Thanks for your reply @homeworkace! I was just able to reproduce this in the latest Firefox standard release, 121.0.1, as well. If I save from the File menu and refresh the page, the commands are back. Below is the output I am seeing in the console. The error message was similar to that reported in https://github.com/jupyterlab/jupyterlab/issues/7412 note: this issue is not present for me in JupyterLab itself.

Cannot execute key binding 'Escape': command 'documentsearch:end' is not enabled. [3301.bundle.js:1:4552](http://127.0.0.1:8888/static/notebook/3301.bundle.js)
Error rendering buttons of the cell toolbar:  TypeError: t.layout is null
   _addToolbar http://127.0.0.1:8888/static/notebook/7386.bundle.js:1
[7386.bundle.js:1:2611](http://127.0.0.1:8888/static/notebook/7386.bundle.js)
Error rendering buttons of the cell toolbar:  TypeError: t.layout is null
   _addToolbar http://127.0.0.1:8888/static/notebook/7386.bundle.js:1
[7386.bundle.js:1:2611](http://127.0.0.1:8888/static/notebook/7386.bundle.js)
Error rendering buttons of the cell toolbar:  TypeError: t.layout is null
   _addToolbar http://127.0.0.1:8888/static/notebook/7386.bundle.js:1
[7386.bundle.js:1:2611](http://127.0.0.1:8888/static/notebook/7386.bundle.js)
Error rendering buttons of the cell toolbar:  TypeError: t.layout is null
   _addToolbar http://127.0.0.1:8888/static/notebook/7386.bundle.js:1
[7386.bundle.js:1:2611](http://127.0.0.1:8888/static/notebook/7386.bundle.js)
Cannot execute key binding 'Shift Enter': command 'notebook:run-cell-and-select-next' is not enabled. 10 [3301.bundle.js:1:4552](http://127.0.0.1:8888/static/notebook/3301.bundle.js)
Cannot execute key binding 'Cmd Z': command 'editmenu:undo' is not enabled. 4 [3301.bundle.js:1:4552](http://127.0.0.1:8888/static/notebook/3301.bundle.js)
Cannot execute key binding 'Escape': command 'notebook:enter-command-mode' is not enabled. [3301.bundle.js:1:4552](http://127.0.0.1:8888/static/notebook/3301.bundle.js)
Cannot execute key binding 'Y': command 'notebook:change-cell-to-code' is not enabled. [3301.bundle.js:1:4552](http://127.0.0.1:8888/static/notebook/3301.bundle.js)
Cannot execute key binding 'Escape': command 'notebook:enter-command-mode' is not enabled. 6 [3301.bundle.js:1:4552](http://127.0.0.1:8888/static/notebook/3301.bundle.js)
Cannot execute key binding 'Shift Enter': command 'notebook:run-cell-and-select-next' is not enabled. [3301.bundle.js:1:4552](http://127.0.0.1:8888/static/notebook/3301.bundle.js)
Uncaught (in promise) Error: CodeMirrorEditor already set.
   setEditor http://127.0.0.1:8888/static/notebook/4131.bundle.js:1
   z http://127.0.0.1:8888/static/notebook/2479.bundle.js:1
2 [4131.bundle.js:1:133181](http://127.0.0.1:8888/static/notebook/4131.bundle.js)
Error rendering buttons of the cell toolbar:  TypeError: t.layout is null
   _addToolbar http://127.0.0.1:8888/static/notebook/7386.bundle.js:1
[7386.bundle.js:1:2611](http://127.0.0.1:8888/static/notebook/7386.bundle.js)
Error rendering buttons of the cell toolbar:  TypeError: t.layout is null
   _addToolbar http://127.0.0.1:8888/static/notebook/7386.bundle.js:1
[7386.bundle.js:1:2611](http://127.0.0.1:8888/static/notebook/7386.bundle.js)

RRosio avatar Jan 16 '24 17:01 RRosio

Potentially related issue in JupyterLab: https://github.com/jupyterlab/jupyterlab/issues/15637

RRosio avatar Jan 23 '24 17:01 RRosio