Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Annotation] Get rid of use of id in the annotation layer #15056

Closed
calixteman opened this issue Jun 17, 2022 · 1 comment · Fixed by #15057
Closed

[Annotation] Get rid of use of id in the annotation layer #15056

calixteman opened this issue Jun 17, 2022 · 1 comment · Fixed by #15057
Assignees
Labels

Comments

@calixteman
Copy link
Contributor

For example, try to open:
https://www.irs.gov/pub/irs-pdf/f1040.pdf#77R

in the console we have:
PDFLinkService.goToDestination: "null" is not a valid destination array, for dest="77R".

now press enter in the address bar and the document is scrolled on page 2.

If a destination is named 77R we could have a bug.

For reference:
#15054 (comment)

As far as I can tell this id is only used by JS stuff.

@Snuffleupagus
Copy link
Collaborator

Instead of an id added to elements, should we perhaps "replace" that with a custom attribute so that we can find them easily using something like the following?

document.querySelector(`[data-element-id="${id}"]`);

The only thing that might become a little bit annoying is that we probably need to update lots of integration-tests...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants