When using annotationManager.jumpToAnnotation, giving options to the function makes the page go blank

WebViewer Version:

Do you have an issue with a specific file(s)? No, all files are concerned
Can you reproduce using one of our samples or online demos? I can’t, I’d have to modify the code behind the demo. Is there a demo with js available?

Are you using the WebViewer server? I don’t know
Does the issue only happen on certain browsers?
Is your issue related to a front-end framework? No
Is your issue related to annotations? Yes

Please give a brief summary of your issue:

const { annotationManager } = this.vwInstance.Core;
annotationManager.jumpToAnnotation(annotation, { isSmoothScroll: true, verticalOffset: this.highlightVerticalOffset });

This makes the page go blank

The result ^

const { annotationManager } = this.vwInstance.Core;
annotationManager.jumpToAnnotation(annotation);

This works, but isn’t as nice as it used to be.

Please describe your issue and provide steps to reproduce it:
Create an annotation.
Try to jump to the annotation using the annotationManager.jumpToAnnotation and provide options.

Hello, I’m AiRon, an automated tech support bot :robot:
While you wait for one of our customer support representatives, I can help you with your question.


It seems like you are experiencing an issue with the annotationManager.jumpToAnnotation method when providing options, which causes the page to go blank. This might be related to how the options are handled or any unintended interactions within the WebViewer instance.

Some things you can try:

  • Ensure that the highlightVerticalOffset value is valid and within a reasonable range. Extreme offsets might cause unexpected behavior.

  • Check if there are any console errors that might give you additional information about what goes wrong when options are provided.

  • Verify if the issue persists when using different versions of WebViewer or different browsers to rule out any version-specific or browser-specific issues.

  • Isolate the issue by creating a minimal setup that only includes the jumpToAnnotation functionality to see if other parts of your code might be interfering.



Here are some resources that might help you:


Hopefully, this helps you solve your problem while you wait for a human to get back to you.

Ensure that the highlightVerticalOffset value is valid and within a reasonable range. Extreme offsets might cause unexpected behavior.

Just setting a value for `smoothScroll` creates the issue.

Hello Gabriel,

Thank you for contacting WebViewer Forums.

I was able to reproduce the issue where using jumpToAnnotation() with isSmoothScroll: true option seems to break the page rendering. There seems to be a regression introduced in v11.9 as previous versions did not show this behaviour. I have forwarded this issue to our development team to review and will update you as soon as we can.

Additionally, our team would be interested in knowing how this API is used in your application workflow and if we can provide you with a workaround for the time-being.

Regards,
Luke

We managed to move to the position of the annotation using another function. But it’s not as smooth, and a bit more complicated.

Please, keep me updated regarding the deployment of the fix.