1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-25 16:20:49 +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 = () => {
this.setState((prevState) => {
const dragCounter = prevState.dragCounter + 1
const dragCounter = prevState.dragCounter - 1
const editable = dragCounter === 0 ? false : undefined
return { dragCounter, editable }
})