Issue while scrolling pdf

WebViewer Version: 10.11.0

Do you have an issue with a specific file(s)? Close element
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? Yes
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? Yes
Is your issue related to annotations? Yes

Hello team
We are trying to close an element annotationpopup using the close Elements property of webviewer but we notice after closing if we scroll the pdf up or down the popup comes again.

Regards

Hello Ashish,

Thank you for contacting WebViewer Forums.

You can use the disableElements() instead to remove the popup:

instance.UI.disableElements(['annotationPopup'])

Regards,
Luke

Hello @luke.dam

Using disableElements will completely disable the annotationPopup and will require us to manually enable it so to avoid this only we were using the closeElement.
Actually for us its a strange behaviors because we don’t have any action on scroll and it was working until recently.
Can you please try on your end once and let me know.

Regards

Hello Ashish,

Thank you for your reply.

It is currently expected that the annotation popup reopens on scroll. This default behaviour can be seen currently in the latest version 10.12.

Regards,
Luke

Hello @luke.dam

My issue was that I had closed the element using close element function.
After my element is closed I should not be seeing the element unless I open or do any operation which opens the element (like for example click on highlighted test or select a word).
Here on scroll of pdf I have not done any operation to open the element as such so I think its an issue if on scroll I get to see the element again (the element referred to here is the annotation popup).

Regards

Hello Ashish,

It is the default action of the annotation popup to reopen on scroll which is why you are seeing it without any code changes. You can see this default interaction on our showcase by clicking on an annotation and scroll, you will see the annotation popup close and reopen: https://showcase.apryse.com/

If you would like to change this behaviour internally, please refer to this guide on customizing the UI: Advanced-customization | Apryse Documentation

Is there a reason why disable/enable elements does not work for your workflow?

Regards,
Luke