1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

XFA - Handle maxChars property for text fields

- it aims to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1716294.
This commit is contained in:
Calixte Denizet 2021-06-14 13:07:00 +02:00
parent 9d081d09c7
commit d89c429d78
2 changed files with 60 additions and 0 deletions

View file

@ -2405,6 +2405,10 @@ class Field extends XFAObject {
value = htmlValue.value;
}
}
if (this.ui.textEdit && this.value.text && this.value.text.maxChars) {
ui.children[0].attributes.maxLength = this.value.text.maxChars;
}
if (value) {
if (ui.children[0].name === "textarea") {
ui.children[0].attributes.textContent = value;