Skip to content
Snippets Groups Projects
Commit 9e56896b authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

Element visible: check for offsetHeight/offsetWidth

parent d6de021a
No related branches found
No related tags found
No related merge requests found
...@@ -86,8 +86,7 @@ Element.prototype.fadeIn = function(display = undefined){ ...@@ -86,8 +86,7 @@ Element.prototype.fadeIn = function(display = undefined){
}; };
Element.prototype.visible = function() { Element.prototype.visible = function() {
// TODO: should we actually check for offsetWidth/offsetHeight == 0? return this.style.display != "none" && this.offsetHeight != 0 && this.offsetWidth != 0;
return this.style.display != "none";
} }
Element.visible = function(elem) { Element.visible = function(elem) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment