From e8c66dc10a041352e30fb3b1250fdeffbec5ceac Mon Sep 17 00:00:00 2001 From: shsa-odoo Date: Mon, 11 Jul 2022 09:51:23 +0000 Subject: [PATCH] [FIX] web_editor: replace button should replace the image then add another Before this commit: Replace button was adding another image without replacing the existing one. After this commit: Now replace button replaces the existing image with another one. Task-2895601 closes odoo/odoo#98513 X-original-commit: 3e8db4fa7a2d8eb9eba4b184e33bb3a6f69ce687 Signed-off-by: David Monjoie (dmo) --- addons/web_editor/static/src/js/wysiwyg/wysiwyg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index d960b993000..07111b80982 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -1346,7 +1346,7 @@ const Wysiwyg = Widget.extend({ break; case 'media-insert': case 'media-replace': - this.openMediaDialog(); + this.openMediaDialog({ node: this.lastMediaClicked }); break; case 'media-description': new weWidgets.AltDialog(this, {}, this.lastMediaClicked).open();