Skip to content

Commit 23f762a

Browse files
Restored selection cleanup on selection change
1 parent 9ce6e88 commit 23f762a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/text-annotator/src/SelectionHandler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ export const SelectionHandler = (
149149
*/
150150
if (store.getAnnotation(currentTarget.annotation)) {
151151
store.updateTarget(currentTarget, Origin.LOCAL);
152+
} else {
153+
// Proper lifecycle management: clear the previous selection first...
154+
selection.clear();
152155
}
153156
});
154157

0 commit comments

Comments
 (0)