Elements using a Vue-js X-Template, are bugged inside the builder. Say you put a class of .bricks-type-hero via the type setting on a Heading. If you reload the Builder this, class cannot get deleted. When you change the type setting to .bricks-type-lead or reset the option, the .bricks-type-hero class stays on the element. In fact this is true for all settings that add classes to elements using the render_builder() method (as far as i’ve tested).
Hey @UserfreundSuat,
sorry for the late reply. I kind of lost this one. As you already have the element prepared, could you send it to me to test (and that styling).
Hi There,
Since there is a new render method at play with Bricks 2.0 I was hoping this topic might be on the menu so to speak. Are there any updates yet, I tested it with the RC Version and the bug is still there.
The is_frontend_call method is defined in my abstract class that extends the bricks element-abstract class works great to negate the undesired behaviour:
// MARK: Is Builder Call
public static function is_builder_call(): bool
{
return (bricks_is_builder_call() || bricks_is_builder_iframe());
}
// MARK: Is Frontend call
public static function is_frontend_call(): bool
{
return !self::is_builder_call() && bricks_is_frontend();
}
We’ve addressed this in Bricks 2.4-rc (release candidate), now available for manual download from your Bricks account.
Custom element attributes and classes now stay in sync on the Builder canvas when settings change, without requiring a reload.
Please read the changelog entry before testing, and let us know if you experience any issues. Release candidates are not recommended for production sites.