diff --git a/js/common.js b/js/common.js
index 6e8168357864fffe4a6bcf6c395854f48a4001b3..e85862990da40c5144a2064fc6835fe68d3dcbc7 100755
--- a/js/common.js
+++ b/js/common.js
@@ -86,8 +86,7 @@ Element.prototype.fadeIn = function(display = undefined){
 };
 
 Element.prototype.visible = function() {
-	// TODO: should we actually check for offsetWidth/offsetHeight == 0?
-	return this.style.display != "none";
+	return this.style.display != "none" && this.offsetHeight != 0 && this.offsetWidth != 0;
 }
 
 Element.visible = function(elem) {