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
This commit is contained in:
Ed Sanders 2022-02-02 16:16:18 +00:00
parent cb5d585b93
commit 9e43f5c261

View file

@ -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 );