From f924e47d61763ee81c5faf6f3bd3e371d4730bea Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 17 Apr 2024 14:08:29 +0300 Subject: [PATCH] [DE] Fix closing pdf-form with changes --- apps/documenteditor/main/app/controller/Main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 710056eae3..17071e25e4 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1949,12 +1949,12 @@ define([ me.hidePreloader(); me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); } - + } + if (this.appOptions.isEdit || this.appOptions.isRestrictedEdit && this.appOptions.isPDFForm) { // Message on window close window.onbeforeunload = _.bind(me.onBeforeUnload, me); window.onunload = _.bind(me.onUnload, me); - } - if (!this.appOptions.isEdit) + } else window.onbeforeunload = _.bind(me.onBeforeUnloadView, me); },