diff options
| author | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-08-20 12:09:02 +0000 |
|---|---|---|
| committer | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-09-10 13:35:03 +0000 |
| commit | f1f48cdaab3dd7847e8546ad9887f24a9e2ed4c1 (patch) | |
| tree | ee05515b62f46599f072f9ee6c91700d2f56908a /addons/web_editor/static/src/js/editor | |
| parent | 70ccdbdda81d1b57210766cb808f618f343ecaf4 (diff) | |
[IMP] web, website: prevent auto scroll from left panel
* Prior to this commit, when starting to drag a new snippet from
the left panel, the auto scroll feature was triggered if the
snippet was one of the top or bottom ones.
* After this commit, the auto scroll feature will be disabled from
the left panel.
task-2307404
closes odoo/odoo#56208
Related: odoo/enterprise#12539
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/web_editor/static/src/js/editor')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.editor.js | 3 |
1 files changed, 3 insertions, 0 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 97572f4ec8c..45139bb00fe 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -1791,6 +1791,9 @@ var SnippetsMenu = Widget.extend({ $top: $('#web_editor-top-edit'), // TODO should ideally be retrieved another way $left: this.$el, }, options.offsetElements), + scrollBoundaries: Object.assign({ + left: false, + }, options.scrollBoundaries), jQueryDraggableOptions: Object.assign({ appendTo: this.$body, cursor: 'move', |
