For Bricks elements that enqueue their own scripts, via the enqueue_scripts() method from Bricks’ element API… the enqueuing only happens on the front end or when in Bricks builder but not when they’re inside of a component that is being used as a block when viewing inside the block editor. This can result in broken layouts and inaccessible content when viewing inside the block editor.
As a simple example… the issue can be seen with the nestable slider or the image gallery when set to use masonry.
To reproduce, add a nestable slider or gallery set to masonry inside of a component and turn into a ‘block’. Then add that block to any post / page.
Notice the slider isn’t initialised and neither is the masonry layout when viewing in the editor (due to the splide and isotope / photoswipe not being enqueued).
It’s not just these two element, it’s any elements using enqueue_scripts().
(Most likely enqueue_scripts() in the API just needs to be added to a gutenberg / block editor specific hook to ensure it is working in the editor view also)
Thank you for your response. Unfortunately, the bug is still present in version 2.3.1 as well.
I’ve built an image carousel component using a Carousel element with an Image Gallery prop bound to it. It works correctly inside the Bricks admin, but on the frontend and in the Gutenberg editor the carousel does not load at all — no images, no arrows, nothing is displayed.
This is unfortunately a problem as we have a website that is about to be handed over to a client. Is there any temporary workaround available so our client can use this component in the meantime?