Annotation Tools pop-up not showing up when File Preview Events enabled
Hi there,
I have the following event options configured for my listener:
const eventOptions = {
enableFilePreviewEvents: true,
enableAnnotationEvents: true,
listenOn: [
AdobeDC.View.Enum.FilePreviewEvents.PREVIEW_SELECTION_END,
AdobeDC.View.Enum.AnnotationEvents.ANNOTATION_ADDED
]
}My issue is that whenever I add the PREVIEW_SELECTION_END to the list of events, the small pop-up annotation tools bar next to my cursor no longer shows up, and when I click the highlight button on the annotations tools bar at the top of the page, it doesn't highlight the selected text. For context, what I am trying to do is to capture the selected text, and then do something with that captured text if the user highlights it immediately after. As far as I can tell, the only way to get the value of the selected text is using the PREVIEW_SELECTION_END event. When I remove PREVIEW_SELECTION_END from my eventOptions, annotations work as expected, but I can't seem to find anywhere in the docs that explicitly say that these two event types are not compatible with each other.
These are my viewer config options for reference:
var viewerConfig = {
enableAnnotationAPIs: true,
showAnnotationTools: true,
includePDFAnnotations: true,
};Is there a configuration I am missing to make both these event types work simultaneously?
