We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9ce6e88 + d1dddc9 commit 775f612Copy full SHA for 775f612
packages/text-annotator/src/SelectionHandler.ts
@@ -149,6 +149,9 @@ export const SelectionHandler = (
149
*/
150
if (store.getAnnotation(currentTarget.annotation)) {
151
store.updateTarget(currentTarget, Origin.LOCAL);
152
+ } else {
153
+ // Proper lifecycle management: clear the previous selection first...
154
+ selection.clear();
155
}
156
});
157
@@ -206,7 +209,7 @@ export const SelectionHandler = (
206
209
if (selected.length !== 1 || selected[0].id !== hovered.id) {
207
210
selection.userSelect(hovered.id, evt);
208
211
- } else if (!selection.isEmpty()) {
212
213
selection.clear();
214
215
};
0 commit comments