mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-27 00:54:22 +02:00
fix: reset drag counter properly in void nodes (#1035)
This commit is contained in:
committed by
Ian Storm Taylor
parent
9faaccd8ed
commit
d85fcda0c0
@@ -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 }
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user