diff options
| author | Benjamin Vray <bvr@odoo.com> | 2020-02-12 16:04:23 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-03-23 12:42:02 +0000 |
| commit | 1e35fffc89741f7b9ef7b380ee77f4963f7084a9 (patch) | |
| tree | 0773e803d48a302f6d5864a99705cd24ffc7b323 /addons/web_editor/static/src/js | |
| parent | 3998fa8dc18ac36cf99f273d96c4b5f536ff7a9f (diff) | |
[FIX] web_editor: get size of resizable elements on mouse down
Get the elements size also on mousedown. Because before that, the
size was only obtained on the start method when some elements did not
yet have its actual size. Example: elements in inactive slides in the
carousel snippet.
task-2162952
closes odoo/odoo#48193
X-original-commit: 2a36c684bb33704e46a6f30b5c501043683da67d
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.options.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index 07f1a9af8e5..15429cf3cf6 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -2224,6 +2224,9 @@ registry.sizing = SnippetOptionWidget.extend({ this.$handles.on('mousedown', function (ev) { ev.preventDefault(); + // First update size values as some element sizes may not have been + // initialized on option start (hidden slides, etc) + resizeValues = self._getSize(); var $handle = $(ev.currentTarget); var compass = false; |
