jumpToAnnotation resets scroll position to Page 1 / Start of PDF before navigating to destination page in WebViewer 11

WebViewer Version: 11.12.0 (Migrated from 10.10.1)

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? Yes (Any
multi-page PDF with placed annotations)
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No (Vanilla JS / jQuery)
Is your issue related to annotations? Yes (specifically jumpToAnnotation API)

Please give a brief summary of your issue: jumpToAnnotation resets scroll position to Page 1 / Start of PDF before navigating to destination page in WebViewer 11

Please describe your issue and provide steps to reproduce it:
We recently migrated our document viewer from WebViewer 10.10.1 to 11.12.0. Following this migration, we have noticed a major change in how annotationManager.jumpToAnnotation behaves when navigating between annotations on different pages.

Steps to Reproduce:

  1. Load a multi-page PDF with annotations scattered across multiple pages
    (e.g., Page 3 and Page 5).
  2. Scroll to Page 5, and trigger a programmatic jump back to an annotation on
    Page 3 using:

annotationManager.jumpToAnnotation(targetAnnotation, { isSmoothScroll:
true });

Expected Behavior (as in WebViewer 10.10.1):
The viewer scrolls smoothly and directly from its current position (Page 5) to
the target annotation on Page 3.

Actual Behavior (in WebViewer 11.12.0):

  1. The viewport instantly resets / jumps back to the very first page (top of
    the document).
  2. It then scrolls from the first page down to the destination
    annotation on Page 3.

Our concerns:

  1. Is this layout reset to the start of the PDF expected behavior in WebViewer 11 when executing jumpToAnnotation?
  2. Are there any configuration flags or layout options we can set during initialization to force jumpToAnnotation to transition directly from its current scroll viewport position rather than resetting to page 1 first?

Please provide a link to a minimal sample where the issue is reproducible: A simple setup listening to a sidebar button click that calls jumpToAnnotation on any off-screen annotation on a multi-page document reproduces this behavior.

Hello Rohan.

Thank you for contacting WebViewer Forums.

We are currently not aware of an issue where the starting position would reset back to the first page when using the jumpToAnnotation() API. It should scroll from the current viewport position to the target annotation.

To investigate, could you please provide the following:

  1. Video showcasing this issue
  2. Minimal sample project to reproduce the issue

Regards,
Luke

Hello Luke,

Thanks for responding. While I cannot share much, I’m adding a video showcasing the issue.

I am on the 41st page and jump to a signature box thats on the same page. The pdf scrolls from page 1 to 41 again despite being on the same page.

Code snippet:

            $('body').on('click', '.jumpToAnnot', function () {
                var targetId = $(this).attr('id').replaceAll('view-', '');

                var selectedAnnot = $widget._getAnnotationById(targetId);

                if (selectedAnnot) {
                    annotationManager.jumpToAnnotation(selectedAnnot, {isSmoothScroll: true});
                }
            });

Thanks,
Rohan

Hello Rohan,

Thank you for your reply.

At this time, our team is unable to reproduce the issue. We would require a minimal sample project showcasing the issue to investigate further.

That being said, a migration from v10 to v11 changed the way WebViewer is initialized from Iframe to WebComponent. I would recommend checking if there are any CSS or code that may need update or interfere with the Viewer container. I would also check if switching back to Iframe fixes the issue for you. More information can be found here: Migrating to V11 of WebViewer | Apryse documentation

Regards,
Luke