Browse Source

don't rely on hidden attribute to find hidden elements

Gildas 7 years ago
parent
commit
ed2fbdf6fd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/single-file/doc-helper.js

+ 2 - 2
lib/single-file/doc-helper.js

@@ -184,8 +184,8 @@ this.docHelper = this.docHelper || (() => {
 	}
 
 	function testHiddenElement(element, style) {
-		let hidden = element.hidden;
-		if (!hidden && style) {
+		let hidden = false;
+		if (style) {
 			hidden = style.display == "none";
 			if (!hidden && (style.opacity == "0" || style.visibility == "hidden")) {
 				const boundingRect = element.getBoundingClientRect();