ianstormtaylor / slate

A completely customizable framework for building rich text editors. (Currently in beta.)

Home Page:http://slatejs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undo doesn't work properly after drag & drop text

fuchen opened this issue · comments

Description
Undo doesn't work properly after drag & drop text.

Recording

slate-bug-report.mp4

Steps
To reproduce the behavior:

  1. Open rich text example: https://www.slatejs.org/examples/richtext
  2. Turn the quoted text into a heading element
  3. Select part of text in the heading element, drag and drop it into the paragraph element
  4. Undo

Expectation
Content of the heading element should be restored.

**Actual
Content of the heading element is restored.
And the heading element is turned back to quoted text.
It looks like that undo is invoked twice.

Environment

  • Slate Version: 0.100.0
  • Operating System: Windows 10
  • Browser: Edge 119.0.2151.44