From 9728715bdb174c1f7a95a3fd68a6bead0190dba8 Mon Sep 17 00:00:00 2001 From: Rodolpho Lima Date: Thu, 5 Oct 2023 17:20:07 +0200 Subject: [PATCH] [FIX] web_editor: remove tooltip in HtmlField Since [1] the behavior for double-clicking an image in an html field is displaying it "full-screen", and no longer opening the Media Dialog to edit it. But, when an image is (single) clicked, a tooltip is displayed with the misleading "Double-click to edit" message. This commit makes sure the tooltip is no longer displayed in HtmlField, while keeping its original behavior for other forms of use of the Wysiwyg component, like in website. [1]: https://github.com/odoo/odoo/commit/8ca115b3b9dfe87b59b6b064a4d85ea152d9214c task-3542766 closes odoo/odoo#141471 X-original-commit: 7cf2896ccb47c7832663cd42b9f22899f4eb5d3c Signed-off-by: Nicolas Bayet (nby) Signed-off-by: Rodolpho Cammarosano de Lima (rcdl) --- 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 a45d152365e..3aede52d3b9 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -2157,7 +2157,7 @@ export class Wysiwyg extends Component { this._updateMediaJustifyButton(); this._updateFaResizeButtons(); } - if (isInMedia) { + if (isInMedia && !this.options.onDblClickEditableMedia) { // Handle the media/link's tooltip. this.showTooltip = true; this.tooltipTimeouts.push(setTimeout(() => {