There’s an issue with.
$this->set_attribute( ‘_root’, $name, $value ); from Bricks v1.10 onwards, with how the attributes added when inside the builder.
I’ve created a custom element for creating a reduced test case. Code linked to below.
When trying to change an attribute on an element via the settings, Bricks sometimes updates the attribute value incorrectly in the builder. The previous value remains. This can cause styling issues and loss of functionality in the builder for elements that get the attribute values with JS.
Reduced test case, new element code with just one setting to change attribute values - test element with setting to change attribute, reduced test case · GitHub
Screen recording showing the issue - Attribute value issue in builder (sorry for the accidental music in the background, the screen recorder picked up the music I was listening to)
Notice that value isn’t changed from ‘option-one’ to ‘option-two’, it’s now adds the new value and so becomes ‘option-one option-two’. it doesn’t always happen, it happens more frequently inside of a query loop (if unable to recreate, place the element inside of a query loop).
i’ve tested different versions, and it appeared in v1.10. Going back to v1.9.9 solves it, the value is always updated correctly.