mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
XFA - By default a text ui has only one line when in a field element
- it aims to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1716809.
This commit is contained in:
parent
f9a0568f96
commit
793a0156ce
4 changed files with 69 additions and 7 deletions
|
@ -18,6 +18,7 @@ import {
|
|||
$addHTML,
|
||||
$appendChild,
|
||||
$childrenToHTML,
|
||||
$clean,
|
||||
$content,
|
||||
$extra,
|
||||
$finalize,
|
||||
|
@ -4820,11 +4821,7 @@ class TextEdit extends XFAObject {
|
|||
"on",
|
||||
]);
|
||||
this.id = attributes.id || "";
|
||||
this.multiLine = getInteger({
|
||||
data: attributes.multiLine,
|
||||
defaultValue: 1,
|
||||
validate: x => x === 0,
|
||||
});
|
||||
this.multiLine = attributes.multiLine || "";
|
||||
this.use = attributes.use || "";
|
||||
this.usehref = attributes.usehref || "";
|
||||
this.vScrollPolicy = getStringOption(attributes.vScrollPolicy, [
|
||||
|
@ -4838,6 +4835,17 @@ class TextEdit extends XFAObject {
|
|||
this.margin = null;
|
||||
}
|
||||
|
||||
[$clean](builder) {
|
||||
super[$clean](builder);
|
||||
const parent = this[$getParent]();
|
||||
const defaultValue = parent instanceof Draw ? 1 : 0;
|
||||
this.multiLine = getInteger({
|
||||
data: this.multiLine,
|
||||
defaultValue,
|
||||
validate: x => x === 0 || x === 1,
|
||||
});
|
||||
}
|
||||
|
||||
[$toHTML](availableSpace) {
|
||||
// TODO: incomplete.
|
||||
const style = toStyle(this, "border", "font", "margin");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue