@soomo/text-annotator 3.0.0-staging.40 → 3.0.0-staging.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2266,7 +2266,7 @@ const bo = (t, e, n) => {
|
|
|
2266
2266
|
});
|
|
2267
2267
|
document.addEventListener("selectionchange", A);
|
|
2268
2268
|
const y = (w) => {
|
|
2269
|
-
d = Ve(w), m = d.button === 0;
|
|
2269
|
+
d = Ve(w), m = d.button === 0, c = void 0;
|
|
2270
2270
|
};
|
|
2271
2271
|
document.addEventListener("pointerdown", y);
|
|
2272
2272
|
const h = (w) => {
|
|
@@ -2279,10 +2279,12 @@ const bo = (t, e, n) => {
|
|
|
2279
2279
|
const { selected: C } = p;
|
|
2280
2280
|
(C.length !== 1 || C[0].id !== S.id) && p.userSelect(S.id, w);
|
|
2281
2281
|
} else p.isEmpty() || p.clear();
|
|
2282
|
-
}
|
|
2282
|
+
};
|
|
2283
|
+
document.getSelection();
|
|
2284
|
+
const L = w.timeStamp - d.timeStamp;
|
|
2283
2285
|
setTimeout(() => {
|
|
2284
|
-
const
|
|
2285
|
-
g && L < 300 ? (c = void 0, B()) : c && p.userSelect(c.annotation, w);
|
|
2286
|
+
const g = document.getSelection();
|
|
2287
|
+
g != null && g.isCollapsed && L < 300 ? (c = void 0, B()) : c && p.userSelect(c.annotation, w);
|
|
2286
2288
|
});
|
|
2287
2289
|
};
|
|
2288
2290
|
document.addEventListener("pointerup", h);
|