diff options
| author | Arthur Detroux (ard) <ard@odoo.com> | 2021-04-12 12:01:15 +0000 |
|---|---|---|
| committer | Arthur Detroux (ard) <ard@odoo.com> | 2021-04-28 09:29:14 +0000 |
| commit | 89e419036e33ebdb2628895f88019da41c87da79 (patch) | |
| tree | 5de2d1ca7dfa7fc288600049042b811a8f411111 /addons/web_editor/static/src/js | |
| parent | 8c672662c80d0dfaeb06eedfc7136a68734fbdb3 (diff) | |
[FIX] web_editor: add check before updateLeftPanel timeout
Added a check to make sure that we do not set a timeout to update the
option panel when said option panel is already open.
This could sometimes occur which could cause all openned select to close
and could fail some tests if said events happened in the middle of
selecting an option.
task-2502297
closes odoo/odoo#69119
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.editor.js | 8 |
1 files changed, 5 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 424b1d4b631..0a757da0e12 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -2679,9 +2679,11 @@ var SnippetsMenu = Widget.extend({ // make text tools visible only on that specific tab). Also do it with // a slight delay to avoid flickering doing it twice. clearTimeout(this._textToolsSwitchingTimeout); - this._textToolsSwitchingTimeout = setTimeout(() => { - this._updateLeftPanelContent({tab: this.tabs.OPTIONS}); - }, 250); + if (!this.$('#o_scroll').hasClass('d-none')) { + this._textToolsSwitchingTimeout = setTimeout(() => { + this._updateLeftPanelContent({tab: this.tabs.OPTIONS}); + }, 250); + } }, /** * @private |
