From 34c401caf8241d6df32ac6efff1aa9e873b68bea Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Tue, 12 Oct 2021 08:04:53 +0000 Subject: [PATCH] [FIX] website: fix save animated snippet Before this commit, when dropping custom snippet (or saved snippet) containing an animation in the page, the animated element of the snippet remained hidden. task-2664876 closes odoo/odoo#78493 X-original-commit: 61d7744ca988641bd4d8a4006350ec197eece25a Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/js/editor/snippets.options.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index 305d7a80220..bbed1a84b91 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -2856,6 +2856,12 @@ options.registry.WebsiteAnimate = options.Class.extend({ this.isAnimatedText = this.$target.hasClass('o_animated_text'); this.$optionsSection = this.$overlay.data('$optionsSection'); }, + /** + * @override + */ + async onBuilt() { + this.$target[0].classList.toggle('o_animate_preview', this.$target[0].classList.contains('o_animate')); + }, /** * @override */