Merge pull request #13693 from calixteman/textfields
XFA - Enable disabled fields (bug 1719464)
This commit is contained in:
commit
fbd2f28618
@ -541,6 +541,8 @@ function fixTextIndent(styles) {
|
|||||||
function setAccess(node, classNames) {
|
function setAccess(node, classNames) {
|
||||||
switch (node.access) {
|
switch (node.access) {
|
||||||
case "nonInteractive":
|
case "nonInteractive":
|
||||||
|
classNames.push("xfaNonInteractive");
|
||||||
|
break;
|
||||||
case "readOnly":
|
case "readOnly":
|
||||||
classNames.push("xfaReadOnly");
|
classNames.push("xfaReadOnly");
|
||||||
break;
|
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(
|
for (const el of rootDiv.querySelectorAll(
|
||||||
".xfaDisabled input, .xfaDisabled textarea"
|
".xfaNonInteractive input, .xfaNonInteractive textarea"
|
||||||
)) {
|
|
||||||
el.setAttribute("disabled", true);
|
|
||||||
}
|
|
||||||
for (const el of rootDiv.querySelectorAll(
|
|
||||||
".xfaReadOnly input, .xfaReadOnly textarea"
|
|
||||||
)) {
|
)) {
|
||||||
el.setAttribute("readOnly", true);
|
el.setAttribute("readOnly", true);
|
||||||
}
|
}
|
||||||
|
@ -254,6 +254,8 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.xfaNonInteractive input,
|
||||||
|
.xfaNonInteractive textarea,
|
||||||
.xfaDisabled input,
|
.xfaDisabled input,
|
||||||
.xfaDisabled textarea,
|
.xfaDisabled textarea,
|
||||||
.xfaReadOnly input,
|
.xfaReadOnly input,
|
||||||
|
Loading…
Reference in New Issue
Block a user