Browser: Any
OS: Any
Video: Screen record
I found a weird bug that happens on the builder only. I have a control like this:
$this->controls['normalSubAlign_Horizontal'] = [
'group' => 'content__submenu',
'label' => esc_html__('Horizontal Align', 'cement-menu'),
'options' => [
'a' => __('Left', 'elemental-menu'),
'b' => __('Center', 'elemental-menu'),
'c' => __('Right', 'elemental-menu'),
],
'default' => 'b',
'type' => 'select',
'inline' => true,
'small' => true
];
And the control value is rendered like this:
<?php
// Skip some code
$item_classes[] = 'cmm25' . $this->settings['normalSubAlign_Horizontal'];
$this->set_attribute('_root', 'class', $item_classes);
?>
<li <?= $this->render_attributes('_root'); ?>>
Everytime I change the select value, Bricks appends the attribute instead of replacing the attribute. Please see the screen record video to understand that behavior.