diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index ef927c85846..01f784f8e53 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -1168,7 +1168,7 @@ var SnippetsMenu = Widget.extend({ this.customizePanel.classList.add('o_we_customize_panel', 'd-none'); this._addToolbar(); this._checkEditorToolbarVisibilityCallback = this._checkEditorToolbarVisibility.bind(this) - $(document.body).on('click', this._checkEditorToolbarVisibilityCallback); + $(this.options.wysiwyg.odooEditor.document.body).on('click', this._checkEditorToolbarVisibilityCallback); if (this.options.enableTranslation) { // Load the sidebar with the style tab only.