diff --git a/app/assets/javascripts/components/annotations/selectionHelpers.ts b/app/assets/javascripts/components/annotations/selectionHelpers.ts index e259031262..604de9644d 100644 --- a/app/assets/javascripts/components/annotations/selectionHelpers.ts +++ b/app/assets/javascripts/components/annotations/selectionHelpers.ts @@ -218,7 +218,8 @@ export function triggerSelectionStart(e: PointerEvent): void { if (!(e.target as Element).closest(".annotation") && !userAnnotationState.formShown) { addSelectionClasses(); - if (!(e.target as Element).closest("button")) { + // reset the selection, unless we are clicking on a button or link (eg. the create annotation button) + if (!(e.target as Element).closest("button,a")) { userAnnotationState.selectedRange = undefined; } }