From 6be36ffe17bde93a16013993e0df3221c72a3398 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 11 Oct 2019 20:10:25 +0200 Subject: [PATCH] Desktop: Fixes #1819: Note view was not reloaded after viewing revisions --- ElectronClient/app/gui/NoteText.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ElectronClient/app/gui/NoteText.jsx b/ElectronClient/app/gui/NoteText.jsx index be82a4bfbd2..97542da34ea 100644 --- a/ElectronClient/app/gui/NoteText.jsx +++ b/ElectronClient/app/gui/NoteText.jsx @@ -691,10 +691,13 @@ class NoteTextComponent extends React.Component { } async noteRevisionViewer_onBack() { - this.setState({ showRevisions: false }); - - this.lastSetHtml_ = ''; - this.scheduleReloadNote(this.props); + // When coming back from the revision viewer, the webview has been + // unmounted so will need to reload. We set webviewReady to false + // to make sure everything is reloaded as expected. + this.setState({ showRevisions: false, webviewReady: false }, () => { + this.lastSetHtml_ = ''; + this.scheduleReloadNote(this.props); + }); } title_changeText(event) {