Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions apps/web/src/components/chat/ChatComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2409,6 +2409,17 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
className="mx-auto w-full min-w-0 max-w-3xl"
data-chat-composer-form="true"
>
{/* Keep this above the collapsed/expanded mobile branches. Opening the
native iOS picker blurs and collapses the composer; remounting the
input before `change` arrives discards the selected files. */}
<input
ref={imageFileInputRef}
type="file"
accept="image/*"
multiple
className="hidden"
onChange={onImageFileInputChange}
/>
<div
className={cn(
"group rounded-[22px] p-px transition-colors duration-200",
Expand Down Expand Up @@ -2921,17 +2932,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
/>
</>
)}
{/* Keep this outside the responsive footer branches. iOS can resize the
viewport while its native picker is open; remounting the input then
discards the pending change event. */}
<input
ref={imageFileInputRef}
type="file"
accept="image/*"
multiple
className="hidden"
onChange={onImageFileInputChange}
/>
<Button
type="button"
size="sm"
Expand Down
Loading