sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

Jupyter: make leaving edit mode better behaved #5109

Closed slel closed 2 months ago

slel commented 3 years ago

Three examples to illustrate the problem. In all cases, start in edit mode in a code cell, say cell N.

A.

In edit mode in cell N, do the following steps at a high pace without waiting between each step for things to complete:

Expected: things happen in order, regardless of lag:

Observed:

User's next step: up-arrow to go back to cell N, hit Enter to enter edit mode, delete unwanted newline, hit Esc to enter command mode, wait, down-arrow to go to cell N+1, hit Enter to enter edit mode.

B.

Similarly, if after Shift-Enter, instead of hitting Enter, one hits M to make cell N+1 a markdown cell, or A to add a new cell between cells N and N+1, instead of the expected command-mode action happening (make cell markdown, resp. new cell above), these often result in the character "m", resp. "a", being appended to cell N.

User's next step: go back to cell N to remove extra M or A, then back to cell N+1.

C.

Similarly, starting in edit mode in a code cell, type (without waiting a lot between each keystroke) the sequence of keys Esc, m, Enter.

Expected:

Observed:

User's next step: wait for CoCalc to be ready, hit Enter again to enter edit mode, remove unwanted newline and character "m", hit Esc, wait, hit M, wait, hit Enter. Get to desired state.

williamstein commented 2 months ago

I've never seen problems like this. Maybe you have a browser extension or something causing trouble, or maybe it was an old bug. Closing.