Browse Source

Fix translation of readonly form fields

- the javascript property to test for `<input readonly>` is actually `this.readOnly`
- https://www.w3schools.com/jsref/prop_text_readonly.asp
Stephen Kennedy 8 years ago
parent
commit
163e1248f7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lib/pdfconverter.cc

+ 2 - 2
src/lib/pdfconverter.cc

@@ -836,7 +836,7 @@ void PdfConverterPrivate::spoolPage(int page) {
 				name,
 				tn == "TEXTAREA",
 				type == "password",
-				elm.evaluateJavaScript("this.readonly;").toBool(),
+				elm.evaluateJavaScript("this.readOnly;").toBool(),
 				elm.hasAttribute("maxlength")?elm.attribute("maxlength").toInt():-1
 				);
 		} else if (type == "checkbox") {
@@ -844,7 +844,7 @@ void PdfConverterPrivate::spoolPage(int page) {
 				webPrinter->elementLocation(elm).second,
 				elm.evaluateJavaScript("this.checked;").toBool(),
 				name,
-				elm.evaluateJavaScript("this.readonly;").toBool());
+				elm.evaluateJavaScript("this.readOnly;").toBool());
 		}
 	}
 	for (QHash<QString, QWebElement>::iterator i=pageAnchors[page+1].begin();