udecode / plate

Rich-text editor with shadcn/ui
https://platejs.org
Other
10.98k stars 672 forks source link

columns bugs #3642

Open hongnny opened 3 days ago

hongnny commented 3 days ago

Description

https://github.com/user-attachments/assets/da8130e0-c92d-4b49-9371-f7aa7549455e

About the columns bug

After I created the columns, I entered the content in each column, and then selected it with ctrl+a, and deleted it with the keyboard backspace. At this time, there was only one column left, and the function on the toolbar was invalid.

After reading the code, it seems that the layout and children in the data do not match, and the nornalize method does not handle this situation.

Or, the layout data is not corrected when deleting

Reproduction URL

No response

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Plate version

36.0.6

Slate React version

18.3.1

Screenshots

No response

Logs

No response

Browsers

No response

Funding

Fund with Polar

sakshikale14 commented 3 days ago

@hongnny should ctrl+a even be selecting both the columns as opposed to just the focused one?

hongnny commented 3 days ago

@sakshikale14 If the cursor is in columns, ctrl+a selects the entire column. This is normal operation.