diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-05-28 10:04:22 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-05-28 14:32:25 +0000 |
| commit | e2cf0a235810c1773bac68592a0dce9a67adbc34 (patch) | |
| tree | c79b10678f490f42a43f915707cf53bad8eaed66 /addons/web_editor/static/src/js/editor | |
| parent | 0c895e0bf9c402fc109e49d063702544b58eb0b4 (diff) | |
[FIX] website, *: review theme tab creation + switching
*: web_editor
When clicking on the theme tab on an empty page, a scrollbar appeared
and stayed. This was because the fake `<theme/>` element was focused and
the overlay positioned randomly outside of the page.
This commit fixes that by simplifying the code and always hiding the
related overlay. This commit also makes sure the onFocus/onBlur method
of the theme options are called consistently, even though they are
probably not useful.
Part of https://github.com/odoo/odoo/pull/52081
closes odoo/odoo#52114
X-original-commit: 7760898de4e14fa30db1db87dfa05276bfcaa2bb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js/editor')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.editor.js | 6 |
1 files changed, 3 insertions, 3 deletions
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 3a91fe2be1c..2870303a53a 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -1872,10 +1872,10 @@ var SnippetsMenu = Widget.extend({ tab = tab || this.tabs.BLOCKS; - while (this.customizePanel.firstChild) { - this.customizePanel.removeChild(this.customizePanel.firstChild); - } if (content) { + while (this.customizePanel.firstChild) { + this.customizePanel.removeChild(this.customizePanel.firstChild); + } $(this.customizePanel).append(content); } |
