From a7ee7f7cb42ab1f89add6651badbc51735f7baac Mon Sep 17 00:00:00 2001 From: "Arthur Detroux (ard)" Date: Wed, 28 Apr 2021 09:52:46 +0000 Subject: [PATCH] [FIX] website: hide cookie bar when entering edit mode Previously : Once a user enabled the cookie bar, it prevented him from dropping snippets in the main area of the page because the focus was on the cookie bar. Dropping snippets there has a confusing behavior and might make the user think the editor is broken. Reason : The cookie bar has an oe_structure class and takes over the body if it's not hidden or dismissed. The oe_structure allows to drop snippets. Fix : Hiding the cookie bar when user enters edit mode to avoid dropping snippets in it by mistake. task-2477430 closes odoo/odoo#70258 X-original-commit: 8c672662c80d0dfaeb06eedfc7136a68734fbdb3 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/snippets/s_popup/000.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/website/static/src/snippets/s_popup/000.js b/addons/website/static/src/snippets/s_popup/000.js index 0966d2d8b29..2b11466e7e6 100644 --- a/addons/website/static/src/snippets/s_popup/000.js +++ b/addons/website/static/src/snippets/s_popup/000.js @@ -28,6 +28,7 @@ const PopupWidget = publicWidget.Widget.extend({ destroy: function () { this._super.apply(this, arguments); $(document).off('mouseleave.open_popup'); + this.$target.find('.modal').modal('hide'); clearTimeout(this.timeout); },