From 519abb8f3a39f1d28138a74e6f3275ab70c8bfe1 Mon Sep 17 00:00:00 2001 From: "MEGASOL\\simon.adams" Date: Sun, 21 Sep 2025 10:03:15 +0200 Subject: [PATCH] buffix apple --- frontend/app.js | 14 ++++++++++++++ frontend/index.html | 1 - frontend/invite.html | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index 2d61075..c481c57 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -353,6 +353,20 @@ dz.addEventListener('drop', (e)=>{ // --- Mobile-safe file input change handler --- const isTouch = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0); + +// On iOS Safari, the `capture` attribute forces camera-only and hides Photo Library. +// Keep camera default on Android, but remove capture elsewhere to allow picking from Photos/Files. +try { + const ua = (navigator.userAgent || navigator.vendor || window.opera || ''); + const isAndroid = /Android/i.test(ua); + if (fi) { + if (isAndroid) { + fi.setAttribute('capture', 'environment'); + } else { + fi.removeAttribute('capture'); + } + } +} catch {} let suppressClicksUntil = 0; if (isTouch && dropHint) { try { dropHint.classList.add('hidden'); } catch {} diff --git a/frontend/index.html b/frontend/index.html index 752d5c9..a0ab8b6 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -50,7 +50,6 @@ type="file" multiple accept="image/*,video/*" - capture="environment" class="absolute inset-0 opacity-0 cursor-pointer" /> diff --git a/frontend/invite.html b/frontend/invite.html index ea630cc..4135a59 100644 --- a/frontend/invite.html +++ b/frontend/invite.html @@ -73,7 +73,7 @@