[FIX] web_editor: traceback after clicking crop button.
Before this commit: After selecting an image and clicking on crop button, crop widget displays and vanish immediately and crop does not work. After clicking on screen, it raises an error (Cannot read properties of null (reading 'removeChild'). After this commit: The crop button works fine without raising any traceback. Task-2804892 X-original-commit: 1ab1c15386f778b04eb78f26b1e0934f3329c6af Part-of: odoo/odoo#90401
This commit is contained in:
committed by
Hiral Bhavsar
parent
ef14f80790
commit
223491036a
@@ -1299,7 +1299,9 @@ const Wysiwyg = Widget.extend({
|
||||
if (!this.lastMediaClicked) {
|
||||
return;
|
||||
}
|
||||
new weWidgets.ImageCropWidget(this, this.lastMediaClicked).appendTo(this.$editable);
|
||||
new weWidgets.ImageCropWidget(this, this.lastMediaClicked).appendTo(this.odooEditor.document.body);
|
||||
this.odooEditor.toolbarHide();
|
||||
$(this.lastMediaClicked).on('image_cropper_destroyed', () => this.odooEditor.toolbarShow());
|
||||
});
|
||||
$toolbar.find('#image-transform').click(e => {
|
||||
if (!this.lastMediaClicked) {
|
||||
|
||||
Reference in New Issue
Block a user