diff --git a/src/pdf/pdf-view.js b/src/pdf/pdf-view.js index 4d9e75e4..78cdbd42 100644 --- a/src/pdf/pdf-view.js +++ b/src/pdf/pdf-view.js @@ -1434,6 +1434,14 @@ class PDFView { } } + let selectedTextAnnotation = selectableAnnotations.find( + x => x.type === 'text' + && x.id === this._selectedAnnotationIDs[0] + ); + if (selectedTextAnnotation) { + return [selectedTextAnnotation]; + } + selectableAnnotations.sort((a, b) => { let aSize, bSize;