Browse Source

use computed style for element.prototype.visible

master
Andrew Dolgov 1 year ago
parent
commit
b74e313844
  1. 2
      js/common.js

2
js/common.js

@ -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) {

Loading…
Cancel
Save