decaporg / decaporg/decap-cms

Regression from the Slate upgrade: Drag'n'drop of editor components no longer works

Open
#1,738 13 comments 0 reactions 0 assignees View on GitHub
area: extensions/widgets/markdown kind: bug pinned
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**

After upgrading to netlify-cms 2, I can no longer use drag and drop to move editor components around.

**To Reproduce**

1. Add a new entry to a collection that has a `body` field
2. Make sure the body editor is in Markdown mode
3. Insert an Image component to the body
4. Insert another image
5. Try to change the order of the images by dragging the header of one of the images

Nothing happens, I cannot drag the image component anywhere.

This also affects horizontal rulers (`- - -`), they used to be draggable, but aren't anymore. They could also be deleted by clicking them then pressing backspace. I'm assuming this is all related, so I won't file separate issues for that.

**Expected behavior**

That a "ghost" of the image component appears and follows the mouse while I'm dragging it.

**Screenshots**

It's hard to illustrate the exact problem with a screenshot, but here's a setting where dragging the gray bar of the image component no longer works:

![screen shot 2018-09-10 at 16 07 52](https://user-images.githubusercontent.com/373545/45302542-e2dde880-b513-11e8-93e5-0aeefb43b275.png)

**Applicable Versions:**

- Netlify CMS version: [e.g. 2.0.4]
- Git provider: [e.g. GitHub, BitBucket]
- OS: [e.g. Windows 7]
- Browser version [e.g. chrome 22, safari 11]

- Node.JS version:

**CMS configuration**

Not relevant, it's reproducible for any configuration that has a collection with a `body` with a markdown type.

**Additional context**

`git bisect` says the problem was introduced in #1451:

```
a1677b0e24e62b2b4b88b69e0d8e634f91475e30 is the first bad commit
commit a1677b0e24e62b2b4b88b69e0d8e634f91475e30
Author: Robert Karlsson
Date: Thu Aug 23 22:54:55 2018 +0200

chore: update Slate dependencies (#1451)

:040000 040000 c614fbc676818d0d0f42d110ce21a9b1a5ad814c ef064111d6dfdd86da3ea6aa18c1b78ba819d6dc M packages
:100644 100644 c2433336fb15a214a8945b1edf7869cd0bbdc622 1d58d5500913be757e4d224dcdd5274c70216176 M yarn.lock
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.