[IMP] web_editor: remove message before leaving page if editor is destro

closes odoo/odoo#62630

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Sébastien Geelen (sge)
2020-12-01 09:26:49 +00:00
parent e50b8ae8df
commit 947fc39d4c
@@ -450,6 +450,9 @@ var Wysiwyg = Widget.extend({
* @override
*/
destroy: function () {
// Saving the content of the editor is not possible after destroy,
// so there's no need to keep the pop-up warning in this case.
window.onbeforeunload = null;
this.editor.stop();
this._super();
},