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

[Annotation] Replace use of id by data-element-id to have the correct id

This commit is contained in:
Calixte Denizet 2022-10-19 23:01:36 +02:00
parent ba3a0e104a
commit 6db9cefaaf
4 changed files with 28 additions and 1 deletions

View file

@ -551,7 +551,8 @@ class AnnotationElement {
// Fallback to a regular DOM lookup, to ensure that the standalone
// viewer components won't break.
for (const domElement of document.getElementsByName(name)) {
const { id, exportValue } = domElement;
const { exportValue } = domElement;
const id = domElement.getAttribute("data-element-id");
if (id === skipId) {
continue;
}