Przeglądaj źródła

fixed issue with checkboxes and radio buttons state

Former-commit-id: 992c48ee27308593422f5201ebbe8b2a85d8ae29
Gildas 6 lat temu
rodzic
commit
a9d472b28b
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -702,7 +702,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 		}
 
 		setInputValues() {
-			this.doc.querySelectorAll("input").forEach(input => {
+			this.doc.querySelectorAll("input:not([type=radio]):not([type=checkbox])").forEach(input => {
 				const value = input.getAttribute(util.INPUT_VALUE_ATTRIBUTE_NAME);
 				input.setAttribute("value", value || "");
 			});