Annotation action tooltip is shown everytime an annotation is clicked without hovering the action

WebViewer Version: 8.11.0

Hello,

After updating the webviewer from v 8.7.0 to 8.10.0 or 8.11.0, everytime I click on an annotation, the tooltip for the first action is shown. This is happening only on the latest versions, on 8.7.0 it works fine. Does anyone know what could be the problem? Thank you! (I attached some videos with 8.7.0 and 8.11.0)


Hello valentin.mihai,

This behaviour was added in WebViewer 8.10 as part of our accessibility improvements to allow users to use the Tab / Shift +Tab keys to select tools in the annotation popup without using the mouse.

We don’t currently have an option to stop the tooltip appearing when first selecting an annotation but allowing it to appear when hovering other options in the annotation popup, but you can use something like the following to disable the tooltip when an annotation is selected and re-enable it when an annotation is deselected so that you don’t need to permanently disable all tooltips in your app:

  annotationManager.addEventListener('annotationSelected', (annotations, action) => {
    if (action === 'selected') {
      instance.disableElements(['tooltip']);
    } else {
      instance.enableElements(['tooltip']);
    }
  });

This way the annotation popup tools will still be accessible without using the mouse but no tooltip will appear.

Would something like this be suitable for what you’re trying to do?

Best Regards,
Carlo Mendoza
Software Developer
PDFTron Systems, Inc.

Hi Carlo, thank you for the solution!