Przeglądaj źródła

don't mark as hidden elements with inline display = none

Former-commit-id: a1bf42fd9a92eccc6b129c9641d3991b69ab9a16
Gildas 6 lat temu
rodzic
commit
515f5d5491
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      lib/single-file/single-file-helper.js

+ 1 - 1
lib/single-file/single-file-helper.js

@@ -282,7 +282,7 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
 			const visibility = computedStyle.getPropertyValue("visibility");
 			hidden = display == "none";
 			if (hidden) {
-				if (!IGNORED_REMOVED_TAG_NAMES.includes(element.tagName)) {
+				if (element.style.getPropertyValue("display") != "none" && !IGNORED_REMOVED_TAG_NAMES.includes(element.tagName)) {
 					element.setAttribute(HIDDEN_CONTENT_ATTRIBUTE_NAME, "");
 					markedElements.push(element);
 				}