From e82def03f2e56cb408ab61a8687339ac3fff00d5 Mon Sep 17 00:00:00 2001 From: Deependra Solanki Date: Tue, 28 Mar 2023 12:39:33 +0000 Subject: [PATCH] [FIX] web_editor: fix /image for pictogram not working Before this commit: clicking on the pictogram, the pictogram is not being displayed on the note. After this commit: pictogram is being displayed on the note. task - 3249342 closes odoo/odoo#119010 X-original-commit: 05f13260c2bbce2c5c69b3626ccb628776b11c68 Signed-off-by: David Monjoie (dmo) --- .../static/src/components/media_dialog/media_dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/components/media_dialog/media_dialog.js b/addons/web_editor/static/src/components/media_dialog/media_dialog.js index bfa913d7f72..102111d5819 100644 --- a/addons/web_editor/static/src/components/media_dialog/media_dialog.js +++ b/addons/web_editor/static/src/components/media_dialog/media_dialog.js @@ -157,7 +157,7 @@ export class MediaDialog extends Component { // adaptation before saving from the active media selector and find a // way to simply close the dialog if the media element remains the same. const saveSelectedMedia = selectedMedia.length - && (this.state.activeTab !== TABS.ICONS.id || selectedMedia[0].initialIconChanged); + && (this.state.activeTab !== TABS.ICONS.id || selectedMedia[0].initialIconChanged || !this.props.media); if (saveSelectedMedia) { const elements = await TABS[this.state.activeTab].Component.createElements(selectedMedia, { rpc: this.rpc, orm: this.orm }); elements.forEach(element => {