Skip to content

Commit d82e9f9

Browse files
authored
Merge pull request #180 from oleksandr-danylchenko/#179-fix-losing-same-annotation-reference
#179 Removed excessive selection cleanup
2 parents c18bb4b + 01353a3 commit d82e9f9

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

packages/text-annotator/src/SelectionHandler.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ export const SelectionHandler = (
219219
currentTarget = undefined;
220220
clickSelect();
221221
} else if (currentTarget && currentTarget.selector.length > 0) {
222-
selection.clear();
223222
upsertCurrentTarget();
224223
selection.userSelect(currentTarget.annotation, clonePointerEvent(evt));
225224
}
@@ -247,7 +246,6 @@ export const SelectionHandler = (
247246
const sel = document.getSelection();
248247

249248
if (!sel.isCollapsed) {
250-
selection.clear();
251249
upsertCurrentTarget();
252250
selection.userSelect(currentTarget.annotation, cloneKeyboardEvent(evt));
253251
}

0 commit comments

Comments
 (0)