diff --git a/src/islands/image/CameraCapture.tsx b/src/islands/image/CameraCapture.tsx index 3f946fb..2fcbaed 100644 --- a/src/islands/image/CameraCapture.tsx +++ b/src/islands/image/CameraCapture.tsx @@ -39,26 +39,20 @@ export default function CameraCapture({ const onFallbackFile = (e: React.ChangeEvent) => { const file = e.target.files?.[0]; - if (file) onCapture(file); + if (file) { stop(); onCapture(file); } }; + const useDeviceCamera = () => fileInputRef.current?.click(); + return (
{error ? (
{error.message}
- +
-
) : (
@@ -66,10 +60,22 @@ export default function CameraCapture({
{hasMultiple && } + {/* Always available — opens the OS camera app on phones. */} +
)} + + {/* Native capture input, always mounted so it works in either state. */} +
); }