XFA - Enable disabled fields (bug 1719464)

- it's a workaround in waiting for JS implementation to let the use fill manually some fields.
This commit is contained in:
Calixte Denizet 2021-07-07 18:46:43 +02:00
parent b2b7806cab
commit d9a776caf8
3 changed files with 21 additions and 6 deletions

View File

@ -538,6 +538,8 @@ function fixTextIndent(styles) {
function setAccess(node, classNames) {
switch (node.access) {
case "nonInteractive":
classNames.push("xfaNonInteractive");
break;
case "readOnly":
classNames.push("xfaReadOnly");
break;

View File

@ -161,13 +161,24 @@ class XfaLayer {
}
}
/**
* TODO: re-enable that stuff once we've JS implementation.
* See https://bugzilla.mozilla.org/show_bug.cgi?id=1719465.
*
* for (const el of rootDiv.querySelectorAll(
* ".xfaDisabled input, .xfaDisabled textarea"
* )) {
* el.setAttribute("disabled", true);
* }
* for (const el of rootDiv.querySelectorAll(
* ".xfaReadOnly input, .xfaReadOnly textarea"
* )) {
* el.setAttribute("readOnly", true);
* }
*/
for (const el of rootDiv.querySelectorAll(
".xfaDisabled input, .xfaDisabled textarea"
)) {
el.setAttribute("disabled", true);
}
for (const el of rootDiv.querySelectorAll(
".xfaReadOnly input, .xfaReadOnly textarea"
".xfaNonInteractive input, .xfaNonInteractive textarea"
)) {
el.setAttribute("readOnly", true);
}

View File

@ -254,6 +254,8 @@
flex: 1;
}
.xfaNonInteractive input,
.xfaNonInteractive textarea,
.xfaDisabled input,
.xfaDisabled textarea,
.xfaReadOnly input,