ソースを参照

don't remove selected nodes

Gildas 7 年 前
コミット
8701aaa5a2
1 ファイル変更1 行追加1 行削除
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -1181,7 +1181,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 						removeNode(node);
 					} else if (node.getAttribute && node.getAttribute(SELECTED_CONTENT_ATTRIBUTE_NAME) == "") {
 						node.removeAttribute(SELECTED_CONTENT_ATTRIBUTE_NAME);
-						node.querySelectorAll("[" + SELECTED_CONTENT_ATTRIBUTE_NAME + "]").forEach(removeNode);
+						node.querySelectorAll("[" + SELECTED_CONTENT_ATTRIBUTE_NAME + "]").forEach(node => node.removeAttribute(SELECTED_CONTENT_ATTRIBUTE_NAME));
 					} else if (node.style) {
 						node.style.setProperty("display", "none", "important");
 						if (node.childNodes) {