mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #13693 from calixteman/textfields
XFA - Enable disabled fields (bug 1719464)
This commit is contained in:
commit
fbd2f28618
3 changed files with 21 additions and 6 deletions
|
@ -541,6 +541,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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue