From 582603a7e8663bce70fcf64fee41d98b8d8f760e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Tue, 18 Oct 2016 01:33:21 +0200 Subject: [PATCH] Fix #385: Re-render when selection state changed for a node (#387) * Re-render when selection state changed for a node * Change condition to be an OR (focus or selection changed) --- src/components/node.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/node.js b/src/components/node.js index e84e2dc81..6ef5791fc 100644 --- a/src/components/node.js +++ b/src/components/node.js @@ -125,8 +125,10 @@ class Node extends React.Component { // the node, to allow for intuitive selection-based rendering. if ( this.props.node.kind != 'text' && - this.props.state.isFocused && - this.props.state.selection.hasEdgeIn(this.props.node) + ( + props.state.isFocused != this.props.state.isFocused || + this.props.state.selection.hasEdgeIn(this.props.node) != props.state.selection.hasEdgeIn(props.node) + ) ) { return true }