$W.style not working

This issue breaks my code on multiple Editor X websites.

Getting an element’s style properties using Velo has stopped working !! all properties return undefined!!

Example:
Home | My Site (editorx.io)

I created a blank a page with 1 box that has a red background.
The only code that’s running is this:

$w.onReady(function () {
    console.log($w("#box1").style.backgroundColor);
    console.log($w("#box1").style);
});

Here’s what’s printed to the console:
undefined
{}

meaning backgroundColor is undefined and style element is an empty object.

This is a fundamental functionality that is widely used, please fix this asap!

Hi Georgie,

I see the issue that you are referring to.
I will check with the velo team if this is indeed a bug.
In the meantime I saw that if you set the style in the code it returns a defined object:


$w.onReady(function(){
$w("#box1").style.backgroundColor = "red";
console.log($w("#box1").style.backgroundColor);
console.log($w("#box1").style);
});

So maybe this can help somehow.