[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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user