From 4828d8384892dfdea9f3b51dddfe4ce52b238639 Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Thu, 5 Jan 2017 13:39:53 +0200
Subject: [PATCH] fix: toggle track change view now works correctly

---
 app/components/SimpleEditor/Editor.js                         | 1 -
 .../elements/track_change/TrackChangeControlViewCommand.js    | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/app/components/SimpleEditor/Editor.js b/app/components/SimpleEditor/Editor.js
index 5ed5fc8..be398b8 100644
--- a/app/components/SimpleEditor/Editor.js
+++ b/app/components/SimpleEditor/Editor.js
@@ -40,7 +40,6 @@ class Editor extends ProseEditor {
 
   updateTrackChangeView () {
     this.extendState({ trackChangesView: !this.state.trackChangesView })
-    console.log('in editor', this.state.trackChangesView)
   }
 
   willUpdateState () {}
diff --git a/app/components/SimpleEditor/elements/track_change/TrackChangeControlViewCommand.js b/app/components/SimpleEditor/elements/track_change/TrackChangeControlViewCommand.js
index fa0d4cc..a8f09c6 100644
--- a/app/components/SimpleEditor/elements/track_change/TrackChangeControlViewCommand.js
+++ b/app/components/SimpleEditor/elements/track_change/TrackChangeControlViewCommand.js
@@ -13,8 +13,8 @@ class TrackChangeControlViewCommand extends Command {
   execute (params, context) {
     const surface = context.surfaceManager.getSurface('body')
     surface.send('trackChangesViewUpdate')
-    surface.selectAll()
-    surface.selectFirst()
+    surface.rerender()
+    return true
   }
 }
 
-- 
GitLab