From fc8248e4b6293f9204c13377d73446fc2adedcbf Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Mon, 18 Dec 2023 19:54:13 +0100 Subject: [PATCH] [FIX] web_editor: also remove img animate class when cleaning attributes There is a code in charge of removing image animation attributes, but this code was not removing the `o_animate_on_hover` class. Probably not that big of a deal but during the investigation of a bug, this class was not removed while the attributes where, which seems to lead to a crash later. Related to commit https://github.com/odoo/odoo/commit/7f730f81ec541cc7791fc6b3fded17c838433f85 Part-of: odoo/odoo#146732 --- addons/web_editor/static/src/js/editor/snippets.options.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index 7a9c9f05ba9..b6a3f1979fd 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -7216,6 +7216,7 @@ registry.ImageTools = ImageHandlerOption.extend({ delete img.dataset.hoverEffectColor; delete img.dataset.hoverEffectStrokeWidth; delete img.dataset.hoverEffectIntensity; + img.classList.remove("o_animate_on_hover"); return; } if (img.dataset.mimetype !== "image/svg+xml") {