From 404ed0f7884ff724706e6d7f50d35482e92ce60a Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 31 Aug 2016 15:23:56 +0200 Subject: [PATCH] [FIX] web_editor: do not propagate event communication between background and color snippet options The background and color snippet options communicate so that if a color is set while a background is already set, the backgrond is removed. The problem is that the event propagation was not stop so if a snippet had a background and one of its child set a color, the background was removed. --- addons/web_editor/static/src/js/snippets.options.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/snippets.options.js b/addons/web_editor/static/src/js/snippets.options.js index a6cbb7bb002..996daee8753 100644 --- a/addons/web_editor/static/src/js/snippets.options.js +++ b/addons/web_editor/static/src/js/snippets.options.js @@ -318,6 +318,7 @@ odoo.define('web_editor.snippets.options', function (require) { var res = this._super.apply(this, arguments); this.$target.off(".background-option") .on("background-color-event.background-option", (function (e, type) { + e.stopPropagation(); this.$el.find("li:first > a").trigger(type); }).bind(this)); return res;