1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-17 12:41:44 +02:00

fix <Void> to always get latest state onClick, closes #223

This commit is contained in:
Ian Storm Taylor
2016-08-05 10:37:56 -07:00
parent 772aadb70a
commit 3dc930a859

View File

@@ -42,10 +42,11 @@ class Void extends React.Component {
onClick = (e) => { onClick = (e) => {
e.preventDefault() e.preventDefault()
const { state, node, editor } = this.props const { node, editor } = this.props
const next = state const next = editor
.getState()
.transform() .transform()
.moveToRangeOf(node) .collapseToStartOf(node)
.focus() .focus()
.apply() .apply()