1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-27 09:04:31 +02:00

fix: reset drag counter properly in void nodes (#1035)

This commit is contained in:
Tobias Andersen
2017-09-05 18:14:29 +02:00
committed by Ian Storm Taylor
parent 9faaccd8ed
commit d85fcda0c0

View File

@@ -115,7 +115,7 @@ class Void extends React.Component {
onDragLeave = () => { onDragLeave = () => {
this.setState((prevState) => { this.setState((prevState) => {
const dragCounter = prevState.dragCounter + 1 const dragCounter = prevState.dragCounter - 1
const editable = dragCounter === 0 ? false : undefined const editable = dragCounter === 0 ? false : undefined
return { dragCounter, editable } return { dragCounter, editable }
}) })