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:
parent
b2b7806cab
commit
d9a776caf8
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -254,6 +254,8 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.xfaNonInteractive input,
|
||||
.xfaNonInteractive textarea,
|
||||
.xfaDisabled input,
|
||||
.xfaDisabled textarea,
|
||||
.xfaReadOnly input,
|
||||
|
Loading…
Reference in New Issue
Block a user