froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.3k stars 676 forks source link

Pressing up/down arrow keys inside a list inside a table moves left/right instead of up/down #4830

Open shemetz opened 3 weeks ago

shemetz commented 3 weeks ago
Expected behavior.

Arrow keys should behave normally for all cells -- pressing Up should move caret to the cell above

Actual behavior.

When the text selection caret is inside a list which is inside a table cell, pressing Up moves it to the start or end of the previous cell in the table (to the previous cell in the same row, or to the last cell in the previous row)

Steps to reproduce the problem.
  1. Go to https://froala.com/wysiwyg-editor/demo/ for example
  2. Insert a new 2x2 table
  3. Write some text inside each cell, e.g.
. .
aaa bbb
ccc ddd
  1. Select one of the bottom row cells and use the toolbar button to make it an Ordered List
. .
aaa bbb
ccc 1. ddd
  1. Click the space at the start of the cell to place your caret there
. .
aaa bbb
ccc 1. |ddd
  1. Press the Up button, and observe the caret moving to the left:
. .
aaa bbb
ccc| 1. ddd
Editor version.

Latest demo - so presumably 4.3.0

OS.

Mac Sonoma 14.6.1

Browser.

Chrome 129.0.6668.100

Recording.

https://github.com/user-attachments/assets/43c10b59-3fd7-445c-9d23-096ef1cbc179


Possibly related to https://github.com/froala/wysiwyg-editor/issues/4533

shemetz commented 3 weeks ago

@ilyaskarim Was this closed by mistake? I opened this issue 2 days ago, for the latest version (4.3.0)...

ilyaskarim commented 3 weeks ago

Hi @shemetz I apologise. Yes this issue was closed by mistake. I have reopened this issue.