Firefox mobile drag events can provide non-finite coordinate values
(`undefined`, `NaN`, `Infinity`) which cause
`document.elementsFromPoint()` to throw: "Argument 1 is not a finite
floating-point value."
**Changes**
- Added `Number.isFinite()` validation in `findProjectIdAtPosition()`
before calling `elementsFromPoint()`
- Returns `null` when coordinates are invalid, gracefully aborting the
drop operation
```typescript
function findProjectIdAtPosition(mouseX: number, mouseY: number): number | null {
// Validate coordinates are finite numbers (required by elementsFromPoint)
if (!Number.isFinite(mouseX) || !Number.isFinite(mouseY)) {
return null
}
const elementsUnderMouse = document.elementsFromPoint(mouseX, mouseY)
// ... rest of implementation
}
```
The caller already handles `null` returns appropriately, treating it as
"no valid drop target found."
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kolaente <13721712+kolaente@users.noreply.github.com>