mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #13766 from Snuffleupagus/issue-13751
XFA - Handle `startIndex` correctly in the `Template.$toHTML` method (issue 13751)
This commit is contained in:
commit
2cf90cd9ad
3 changed files with 15 additions and 4 deletions
|
@ -5288,13 +5288,14 @@ class Template extends XFAObject {
|
|||
} else if (target instanceof ContentArea) {
|
||||
const index = contentAreas.findIndex(e => e === target);
|
||||
if (index !== -1) {
|
||||
// In the next loop iteration `i` will be incremented, note the
|
||||
// `continue` just below, hence we need to subtract one here.
|
||||
i = index - 1;
|
||||
} else {
|
||||
targetPageArea = target[$getParent]();
|
||||
startIndex =
|
||||
targetPageArea.contentArea.children.findIndex(
|
||||
e => e === target
|
||||
) - 1;
|
||||
startIndex = targetPageArea.contentArea.children.findIndex(
|
||||
e => e === target
|
||||
);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue