Annotation Menu and Placement Not Aligned with Cursor

WebViewer Version: 10.11.1

Do you have an issue with a specific file(s)?: No, the issue occurs with multiple PDF files.
Can you reproduce using one of our samples or online demos?: Yes
Are you using the WebViewer server?: Yes
Does the issue only happen on certain browsers?: No, happens on all browsers tested.
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: **: Annotation menu and placement not aligned with cursor.

Please describe your issue and provide steps to reproduce it:: When I right-click to access the annotations menu, I expect the menu to appear closer to my cursor. Currently, the menu appears offset. After selecting an annotation from the menu, the annotation itself is placed too far from my cursor, making precise placement difficult.
(The more descriptive your answer, the faster we are able to help you): Steps to reproduce:

  1. Open any PDF in WebViewer.
  2. Right-click to open the annotations menu.
  3. Observe the menu position relative to the cursor.
  4. Select any annotation from the menu.
  5. Observe the annotation placement is offset from the cursor.

Please provide a link to a minimal sample where the issue is reproducible:


POT: Recording #1189

1 Like

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’re experiencing issues with the alignment of the annotation menu and placement in WebViewer. This can be caused by a variety of factors, including CSS conflicts, scaling issues, or JavaScript events not firing as expected.

Some things you can try:

  • Check for any custom CSS that might be affecting the positioning of the annotation menu.

  • Ensure that the WebViewer container is not being scaled or transformed by any CSS properties, as this can affect mouse event positions.

  • Verify that the WebViewer version is correctly integrated with your server setup and there are no console errors.

  • Consider updating to the latest version of WebViewer, as updates often include bug fixes for issues like these.

  • Test with and without WebViewer Server to determine if the server setup is affecting behavior.



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.

1 Like

Hi there,

When I right-click to access the annotations menu,

Is this a custom code to bring up the annotations menu from a right-click? The default behaviour when right clicking on a document viewing area brings up the annotation popup:

Can you reproduce this issue on the latest version of WebViewer or the showcase demo?

If there is an offset issue occurring, please try the recalculateLayout API:

best regards,
Kevin

1 Like