From 515fb57aaa2b0959af704eadd7e790f0d5ca1cdf Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Tue, 11 Jun 2019 11:08:34 +0300 Subject: [PATCH] Comment changes --- .../markdownEditor/view/formats/applyWebLinkFormat.js | 5 +++-- .../markdownEditor/view/formats/applyWrapFormatNewLines.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/markdownEditor/view/formats/applyWebLinkFormat.js b/src/components/markdownEditor/view/formats/applyWebLinkFormat.js index f33c3cead..2cf5ff0a7 100644 --- a/src/components/markdownEditor/view/formats/applyWebLinkFormat.js +++ b/src/components/markdownEditor/view/formats/applyWebLinkFormat.js @@ -41,6 +41,7 @@ export default async ({ getState, item, setState, isImage = null }) => { } } - await setState({ text: newText, textUpdated: true }); - await setState({ newSelection }); + await setState({ text: newText, textUpdated: true }, async () => { + await setState({ newSelection }); + }); }; diff --git a/src/components/markdownEditor/view/formats/applyWrapFormatNewLines.js b/src/components/markdownEditor/view/formats/applyWrapFormatNewLines.js index f2744a793..96b188b95 100644 --- a/src/components/markdownEditor/view/formats/applyWrapFormatNewLines.js +++ b/src/components/markdownEditor/view/formats/applyWrapFormatNewLines.js @@ -42,6 +42,7 @@ export default async ({ getState, item, setState }) => { ); } - await setState({ text: newText, textUpdated: true }); - await setState({ newSelection: { start: newPosition, end: newPosition } }); + await setState({ text: newText, textUpdated: true }, async () => { + await setState({ newSelection: { start: newPosition, end: newPosition } }); + }); };