summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/editor/rte.summernote.js
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2021-02-18 12:59:28 +0000
committerNicolas Lempereur <nle@odoo.com>2021-02-18 13:05:48 +0000
commitce93cbd78e282e6957aaeba6f06945f94bfffb26 (patch)
tree89d23f45fa3f953631f4674cfa11681254cccd31 /addons/web_editor/static/src/js/editor/rte.summernote.js
parent8fdd4c503aa7396ed0b1789d74d2a794d61b2508 (diff)
[FIX] web_editor: don't save cropping tool on CTRL+Z
Scenario: - start cropping of an image - press TAB key - do CTRL + Z => now the image cropping tool are inside the page and there is no way to remove them. Why: The image crop tool was added inside the editable elemnt, so if we did an action that changed history the cropping tools are saved in the snapshot and going back to it will add them without any code handling their removal. opw-2394877 opw-2423445 closes odoo/odoo#66462 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js/editor/rte.summernote.js')
-rw-r--r--addons/web_editor/static/src/js/editor/rte.summernote.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/rte.summernote.js b/addons/web_editor/static/src/js/editor/rte.summernote.js
index ec1a059aecd..29a1659d12f 100644
--- a/addons/web_editor/static/src/js/editor/rte.summernote.js
+++ b/addons/web_editor/static/src/js/editor/rte.summernote.js
@@ -1208,7 +1208,7 @@ var SummernoteManager = Class.extend(mixins.EventDispatcherMixin, ServicesMixin,
}
data.__alreadyDone = true;
new weWidgets.ImageCropWidget(this, data.media)
- .appendTo(data.$editable);
+ .appendTo(data.$editable.parent());
},
/**
* Called when a demand to open a link dialog is received on the bus.