I got this error when I was following the Digger game tutorial of mightyeditor. This error was thrown when I try to edit the userData of an object: Uncaught TypeError: Cannot set property length of #<CSSStyleDeclaration> which has only a getter
The source of the error seems to be traced to line 85 of the file InputHelper.js
inheritStyle: function(){
var bounds = this.el.getBoundingClientRect();
var style = window.getComputedStyle(this.el);
for(var i in style){
this.input.style[i] = style[i]; // this is line 85 (comment made by me)
}
this.input.style.zIndex = 10000;
this.input.style.position = "absolute";
this.input.style.visibility = "visible";
this.input.style.top = bounds.top + "px";
this.input.style.left = bounds.left + "px";
this.input.style.width = bounds.width + 1 + "px";
this.input.style.height = bounds.height + 1 + "px";
this.input.style.paddingBottom = "1px";
this.input.style.paddingRight = "1px";
//this.input.style.cssText =
//this.input.style. = el.style.fontSize;
}
I got this error when I was following the Digger game tutorial of mightyeditor. This error was thrown when I try to edit the userData of an object:
Uncaught TypeError: Cannot set property length of #<CSSStyleDeclaration> which has only a getter
The source of the error seems to be traced to line 85 of the file InputHelper.js