From ec47493f46cf72f55d74b11520461ee327909768 Mon Sep 17 00:00:00 2001
From: Goffin Simon <sig@odoo.com>
Date: Tue, 28 Apr 2015 15:16:00 +0200
Subject: [PATCH] [FIX] website: edit menu

when closing a modal, the class 'modal-open' was removed from the
'body' tag and all the existing modals became not scrollable.
The class 'modal-open' must be kept in the 'body' tag if there is
still a visible modal in the dom.
Inspired from commit: dee000be14fd55f7d287eee8569f769505f339ac

opw:633801
---
 addons/website/static/src/js/website.editor.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 33afdbaa6f2b..ac980db1c512 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -927,6 +927,12 @@
         close: function () {
             this.$el.modal('hide');
         },
+        destroy: function () {
+            this.$el.modal('hide').remove();
+            if($(".modal.in").length>0){
+                $('body').addClass('modal-open');
+            }
+        },
     });
 
     website.editor.LinkDialog = website.editor.Dialog.extend({
-- 
GitLab