udecode / plate

A rich-text editor powered by AI
https://platejs.org
Other
11.99k stars 732 forks source link

Cursor can be placed inside table node but not in a cell #2054

Open OliverWales opened 1 year ago

OliverWales commented 1 year ago

Description

The cursor can be focused at the end of a Table node. Typing causes one character to be placed after the node but before the next, and further characters are added to the last cell. Trying to focus the character added after the table causes a slate error.

For example, on the playground:

https://user-images.githubusercontent.com/33153339/206514872-9c78f8cc-e19e-4b48-847e-20f7aa4678af.mov

Steps

  1. Click on the space beneath a table node and before the next node
  2. Type something
  3. Try and select what you typed
  4. Slate crashes

Expectation

You should not be able to focus the cursor in a table but outside of a cell.

Environment

Reproducible here https://platejs.org on Chrome on MacOS

P-174

Funding

Fund with Polar

zbeyens commented 1 year ago

Looks to be fixed in https://platejs.org/

OliverWales commented 1 year ago

@zbeyens seems to still be a bit of an issue:

https://github.com/udecode/plate/assets/33153339/ce5aa2ad-5b5e-4240-a8dd-dfb92dba0011

zbeyens commented 1 year ago

Thanks for the video, got a hard time to reproduce it 😅