[FIX] web_editor, web: fix traceback with drag & drop when no header
Commit [1] introduced the bug by relying on the fact an element with id=top is in the edited DOM. As the website header can be disabled, this induced a crash as soon as the header was indeed disabled. Also, the editor is not meant to edit the website only so we cannot rely at all on the presence of a #top element. [1]: https://github.com/odoo/odoo/commit/6df67a28c2f113572acd4a3db19ab6b1bd37e7da closes odoo/odoo#54409 Signed-off-by:Quentin Smetz (qsm) <qsm@odoo.com>
Showing
- addons/web/static/src/js/core/smooth_scroll_on_drag.js 4 additions, 4 deletionsaddons/web/static/src/js/core/smooth_scroll_on_drag.js
- addons/web_editor/static/src/js/editor/snippets.editor.js 25 additions, 20 deletionsaddons/web_editor/static/src/js/editor/snippets.editor.js
- addons/website/static/src/js/editor/snippets.editor.js 13 additions, 0 deletionsaddons/website/static/src/js/editor/snippets.editor.js
Loading
Please register or sign in to comment