From 932fdb4e24e4f187adbe37ba6babe8159fbca39a Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Fri, 19 Oct 2018 09:58:00 +0000 Subject: [PATCH] [FIX] web_editor: hide link buttons duplicates instead of removing them For example, if primary = alpha, the primary button option is removed in the link dialog. When editing a primary button, this lead to broken behaviors. Hiding the button does the trick. --- addons/web_editor/static/src/js/widgets/widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index 2c06743b361..0edc1adb9b9 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -1466,7 +1466,7 @@ var LinkDialog = Dialog.extend({ var $btn = $(btn); var color = $btn.css('background-color'); if (_.contains(colors, color)) { - $btn.remove(); + $btn.hide(); // Not remove to be able to edit buttons with those styles } else { colors.push(color); }