From 1b06c9721013d7201c2565085a32699faa92ebad Mon Sep 17 00:00:00 2001 From: Gorash Date: Thu, 15 Oct 2020 11:27:37 +0000 Subject: [PATCH] [FIX] web_editor: should not ask if want to leave the page twice --- addons/web_editor/static/src/js/wysiwyg/wysiwyg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index 3725f53e5bd..0531cdd85d8 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -727,8 +727,8 @@ var Wysiwyg = Widget.extend({ return this._saveWebsiteContent(context) .then(() => { this.trigger_up('edition_was_stopped'); + window.onbeforeunload = null; if (reload) { - window.onbeforeunload = null; window.location.reload(); } }).catch(error => {