use computed style for element.prototype.visible

This commit is contained in:
Andrew Dolgov 2021-03-04 14:53:33 +03:00
parent 4fda5ccd0e
commit b74e313844
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ Element.prototype.fadeIn = function(display = undefined){
};
Element.prototype.visible = function() {
return this.style.display != "none" && this.offsetHeight != 0 && this.offsetWidth != 0;
return window.getComputedStyle(this).display != "none"; //&& this.offsetHeight != 0 && this.offsetWidth != 0;
}
Element.visible = function(elem) {