vikunja/frontend/src
Copilot 9bc67032c3
fix: validate coordinates before elementsFromPoint on Firefox mobile (#1992)
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>
2025-12-16 23:05:42 +00:00
..
assets feat: add subsets for all supported languages 2025-08-17 23:11:30 +02:00
components fix(editor): prevent TypeError when typing mentions in comments (#1997) 2025-12-16 22:56:05 +00:00
composables fix: validate coordinates before elementsFromPoint on Firefox mobile (#1992) 2025-12-16 23:05:42 +00:00
constants feat: add time display with configurable format (12h/24h) to non-relative date formats (#1807) 2025-11-13 08:57:06 +00:00
directives chore(tests): remove Cypress, use Playwright exclusively (#1976) 2025-12-12 20:07:18 +00:00
helpers fix(editor): make url bar appear at the correct position when scrolling (#1963) 2025-12-10 20:40:53 +00:00
i18n feat(tasks): scroll to bottom in task detail view when comments are available (#1995) 2025-12-16 22:06:47 +00:00
indexes chore: fix indentation 2025-06-19 10:53:35 +02:00
message fix: add newline at end of line (#827) 2025-05-24 13:57:47 +02:00
modelSchema/common chore: fix indentation 2025-06-19 10:53:35 +02:00
modelTypes feat: make sidebar resizable (#1965) 2025-12-12 10:46:46 +00:00
models feat: make sidebar resizable (#1965) 2025-12-12 10:46:46 +00:00
modules fix(date parsing): 12pm/12am edge case 2025-10-08 18:35:11 +02:00
router fix(user): race condition during email confirmation (#1575) 2025-09-30 20:14:25 +02:00
services fix: ensure API consistency for /tasks and empty array responses (#1988) 2025-12-15 15:34:13 +00:00
stores feat: make sidebar resizable (#1965) 2025-12-12 10:46:46 +00:00
styles fix(menu): alignment of projects and subprojects in sidebar (#1974) 2025-12-15 15:35:56 +00:00
types chore(tests): remove Cypress, use Playwright exclusively (#1976) 2025-12-12 20:07:18 +00:00
views feat(tasks): scroll to bottom in task detail view when comments are available (#1995) 2025-12-16 22:06:47 +00:00
App.vue fix: default language in App.vue types 2025-11-22 17:23:03 +01:00
histoire.setup.ts chore(tests): remove Cypress, use Playwright exclusively (#1976) 2025-12-12 20:07:18 +00:00
main.ts chore(tests): remove Cypress, use Playwright exclusively (#1976) 2025-12-12 20:07:18 +00:00
pinia.ts chore: move frontend files 2024-02-07 14:56:56 +01:00
registerServiceWorker.ts fix: lint issues 2024-10-29 09:57:53 +00:00
sentry.ts fix: migrate Sentry integration to SDK v8 API (#1769) 2025-11-07 15:20:57 +00:00
sw.ts fix: correct comments 2025-07-02 17:46:21 +02:00
urls.ts feat: add utm tag to powered by link 2024-09-23 12:07:06 +02:00
version.json chore: add missing eof newlines (#969) 2025-06-17 09:11:32 +00:00