From dca2efca0f2e5380c505b5410dd6d070217cd9b5 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Thu, 28 Jul 2016 12:09:47 -0600 Subject: [PATCH] fix isBackward in onSelect event selection (#195) --- lib/components/content.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/components/content.js b/lib/components/content.js index 9a5ed14f2..fa5933979 100644 --- a/lib/components/content.js +++ b/lib/components/content.js @@ -594,13 +594,16 @@ class Content extends React.Component { focusNode.nodeType == 3 ) - data.selection = selection.merge({ + selection = selection.merge({ anchorKey: anchor.key, anchorOffset: anchor.offset, focusKey: focus.key, focusOffset: focus.offset, - isFocused: true + isFocused: true, + isBackward: null }) + + data.selection = selection.normalize(document) } this.props.onSelect(e, data)