Skip to content

Commit

Permalink
Merge pull request #4990 from dodona-edu/fix/select-word
Browse files Browse the repository at this point in the history
Fix annotating part of a line
  • Loading branch information
jorg-vr authored Sep 20, 2023
2 parents b2e640e + d798987 commit e702023
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit e702023

Please sign in to comment.