Bricks Version: 1.6b2
Starting in Bricks 1.6 we can no longer scroll the list of theme styles up or down. Tested in multiple browsers. Works fine in 1.5.7.
Bricks Version: 1.6b2
Starting in Bricks 1.6 we can no longer scroll the list of theme styles up or down. Tested in multiple browsers. Works fine in 1.5.7.
Works fine here.
Works fine here too. Brave & Chrome
Thanks @Sridhar and @jornes…I dug deeper and realized it was a new smooth scroll script that I added to several sites (lenis.js) that is causing divs of the builder to no longer scroll.
Do either of you know how to exclude scripts from running when the page is being rendered in the builder/editor (using WPCodeBox)?
You probably want something like this.
PHP:
if(!bricks_is_builder_main()) {
// Enqueue your script here and it won't affect anything outside the canvas
}
Thanks, but it’s a JS script (not PHP)…I need to add a condition to the WPCodeBox condition builder. It has a “Custom PHP condition” but I’ve never used it…however maybe with your idea I can ask in the WPCodeBox FB group how to use the condition builder.
Oh sorry, I thought you were enqueuing your script with php. But you can also check this on the front end with Javascript.
// Waits till the dom is loaded
document.addEventListener("DOMContentLoaded", function (e) {
// bricksIsFrontend returns true/false depending where you run it.
if (bricksIsFrontend) {
// This is where your code can go so it only runs on the front end
exampleCustomFunction();
}
});
P.S. I don’t use wpcodebox, so I don’t know how it runs the code you put in it. Maybe you don’t need the outer part about the DOM like I wrote.
There’s a tutorial for that™.
Awesome!! I have a subscription already, I should have checked there first. Cheers
Just to be clear, it is considered promotion and self advertising if links to pages that are behind a paywall are given (or at least not mentioned that that is the case) in this forum from what I understand.
The above is a free tutorial.