From 9e43f5c261942ee92701288d930791d1cc4e442c Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 2 Feb 2022 16:16:18 +0000 Subject: [PATCH] ReplyWidgetVisual: Fully clear sessionStorage when clearing Clearing the widget removes all the surfaces, meaning there are no doc-state variables to cleanup. Switch the order of these two calls. Change-Id: I6c095a171096cd700ce4cd31b08fa3b982ab2401 --- modules/dt.ui.ReplyWidgetVisual.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/dt.ui.ReplyWidgetVisual.js b/modules/dt.ui.ReplyWidgetVisual.js index 2f7c9c5f0..00d759e52 100644 --- a/modules/dt.ui.ReplyWidgetVisual.js +++ b/modules/dt.ui.ReplyWidgetVisual.js @@ -59,9 +59,9 @@ ReplyWidgetVisual.prototype.getValue = function () { * @inheritdoc */ ReplyWidgetVisual.prototype.clear = function () { - this.replyBodyWidget.clear(); - this.replyBodyWidget.target.clearDocState(); + // #clear removes all the surfaces, so must be done after #clearDocState + this.replyBodyWidget.clear(); // Parent method ReplyWidgetVisual.super.prototype.clear.apply( this, arguments );