fix(selection): handle pointer capture for selectionOnDrag closes #4418

This commit is contained in:
moklick
2024-07-10 14:14:24 +02:00
parent 1e429da911
commit 4062a24add
2 changed files with 8 additions and 5 deletions
@@ -92,7 +92,7 @@
function onPointerDown(event: PointerEvent) {
containerBounds = container.getBoundingClientRect();
container.setPointerCapture(event.pointerId);
(event.target as Element)?.setPointerCapture?.(event.pointerId);
if (
!elementsSelectable ||
@@ -174,7 +174,7 @@
return;
}
container.releasePointerCapture(event.pointerId);
(event.target as Element)?.releasePointerCapture?.(event.pointerId);
// We only want to trigger click functions when in selection mode if
// the user did not move the mouse.