[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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user