mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Widget annotation: implement field name according to the specification
The original code is difficult to read and, more importantly, performs actions that are not described in the specification. It replaces empty names with a backtick and an index, but this behavior is not described in the specification. While the specification is not entirely clear about what should happen in this case, it does specify that the `T` field is optional and that multiple field dictionaries may have the same fully qualified name, so to achieve this it makes the most sense to ignore missing `T` fields during construction of the field name. This is the most specification-compliant solution and, judging by opened issue #6623, also the required and expected behavior.
This commit is contained in:
parent
9295114bdd
commit
1d96854019
3 changed files with 110 additions and 33 deletions
|
@ -91,7 +91,7 @@ function setupForm(div, content, viewport) {
|
|||
// select box is not supported
|
||||
}
|
||||
input.className = 'inputControl';
|
||||
input.name = item.fullName;
|
||||
input.name = item.fieldName;
|
||||
input.title = item.alternativeText;
|
||||
assignFontStyle(input, item);
|
||||
bindInputItem(input, item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue