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.
1 parent 3de2a32 commit eef199dCopy full SHA for eef199d
src/ChessboardProvider.tsx
@@ -617,12 +617,9 @@ export function ChessboardProvider({
617
618
// collision detection that first tries pointer-based detection and then falls back to rectangle intersection for keyboards
619
function collisionDetection(args: Parameters<typeof pointerWithin>[0]) {
620
- // first try pointer-based collision detection
621
- const pointerCollisions = pointerWithin(args);
622
-
623
- // if we found collisions with the pointer, return those
624
- if (pointerCollisions.length > 0) {
625
- return pointerCollisions;
+ // if a pointer is found, return those
+ if (args.pointerCoordinates) {
+ return pointerWithin(args);
626
}
627
628
// otherwise fall back to rectangle intersection
0 commit comments