sagemathinc / cocalc

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

whiteboard: cursor is displaced in sticky note and frame with Vim keyboard bindings and Chrome browser #5957

Open DrXyzzy opened 2 years ago

DrXyzzy commented 2 years ago
  1. Select Vim keyboard bindings in CoCalc preferences.
  2. In a whiteboard, open a new sticky note.
  3. Select the note to allow editing contents.
  4. Add the following from Markdown mode:
    - Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    - Curabitur gravida scelerisque volutpat. Morbi ut tellus nec nibh accumsan accumsan.
    - Aenean maximus finibus erat, eu ornare est malesuada ut.
    - Nam lobortis condimentum luctus. In mollis, ex et aliquet semper, nulla ligula gravida lectus, ut euismod arcu massa ac nibh.
    
  5. Click away to leave edit mode.
  6. Select the sticky note again and select Markdown if it's not already selected.
  7. Click "j" or down arrow three times to move the cursor down to the 4th line.
  8. Press "w" 4 times. This should put the cursor on the "l" in "luctus". Instead, it is vertically and horizontally not as far as it should be from upper left of the sticky note. This makes revising the content of sticky notes very difficult.
wb-vim-chrome-cursor

Not seen in firefox. Not seen (i.e. cursor appears where it's expected) with Standard editor keybindings.

DrXyzzy commented 1 year ago

The behavior has changed as of 2022-11-14. To show the bug:

  1. Select Vim keyboard bindings in CoCalc preferences.
  2. In a whiteboard, open a new sticky note.
  3. Select the note to allow editing contents.
  4. Add the following from Markdown mode:
    1. hello
    1. test
    1. line 3
    
  5. In the scale viewer at lower right, click the "+" twice to scale up the sticky note.
  6. Select the sticky note again and select Markdown if it's not already selected.
  7. Click "j" and "w" a few times.
  8. Observe that the cursor is displaced.
  9. To reset the cursor, refresh the browser. Sticky note will appear in Text mode. Select Markdown mode and cursor is reset to normal.
vi-cursor-resize-bug