plate icon indicating copy to clipboard operation
plate copied to clipboard

Edition strange behavior after drag and drop list item

Open fondation451 opened this issue 3 years ago • 2 comments

Description

After drag and dropping list (list item if the dragged element is li, sub list if the dragged element is ul), the editor is sometimes broken. The insertion and the deletion of text in the editor is not done at the proper place after the drag and drop. I have noticed that after the drag and drop, I get node id (from the drag and drop plugin) collisions. Maybe, it is linked to it.

Steps

https://user-images.githubusercontent.com/12655829/144847998-5d15c17a-d7f1-4847-89b2-13c495ccf3d9.mov

Sandbox

Expectation

No edition bugs

Environment

  • "slate": "^0.70.0",
  • "slate-history": "^0.66.0",
  • "slate-hyperscript": "^0.67.0",
  • "slate-react": "^0.70.0",
  • browser: chrome

fondation451 avatar Dec 06 '21 12:12 fondation451

Thanks for the issue, we didn't test dnd for list items yet (I think it should work for indent lists though).

zbeyens avatar Dec 06 '21 15:12 zbeyens

I believe this problem is not limited to list items ; I've had issues (although am unable to provide a reproduction) where moving around void nodes and text will sometimes break the page entirely, and typing after one node will enter the text at a totally different position. This definitely seems like an issue with the dnd plugin itelf.

odusseys avatar Dec 08 '21 14:12 odusseys