1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-21 22:45:18 +02:00

fix isBackward in onSelect event selection (#195)

This commit is contained in:
Tyler Johnson
2016-07-28 12:09:47 -06:00
committed by Ian Storm Taylor
parent e6690537fb
commit dca2efca0f

View File

@@ -594,13 +594,16 @@ class Content extends React.Component {
focusNode.nodeType == 3 focusNode.nodeType == 3
) )
data.selection = selection.merge({ selection = selection.merge({
anchorKey: anchor.key, anchorKey: anchor.key,
anchorOffset: anchor.offset, anchorOffset: anchor.offset,
focusKey: focus.key, focusKey: focus.key,
focusOffset: focus.offset, focusOffset: focus.offset,
isFocused: true isFocused: true,
isBackward: null
}) })
data.selection = selection.normalize(document)
} }
this.props.onSelect(e, data) this.props.onSelect(e, data)