LibreChat/client/src/components
Danny Avila 537ddba6bb
🫴 fix: Hand Composer Focus Back After Upload Dialogs (#15469)
Typing a message, pasting an image, then pressing Enter did nothing: the
composer held the full draft, the send button was enabled, and Enter was
inert until the user clicked back into the textarea — which reads as
"the textarea needs a text change before it will submit".

The send gating was never at fault. Radix's modal `DialogContent` always
cancels its default close-focus restore and focuses
`context.triggerRef.current` instead. `DragDropModal` — the "Select Upload
Type" dialog a paste or a drop opens — is opened programmatically and so has
no `Dialog.Trigger`, leaving that ref null: nothing is focused and focus
falls to `document.body` when the dialog unmounts. Enter-to-send is a
keydown handler on the textarea, so from `body` it is never reached.

`UploadModalProvider` now records the element the upload was started from,
captured in `openModal` before the dialog mounts (an effect runs too late —
Radix has already moved focus), and restores it once the dialog closes,
queued behind Radix's own deferred restore. This covers every close path:
picking a destination, Cancel, Escape, and dismissing the overlay.

`OGDialog`'s existing `triggerRef` seam does not reach this case, since it
only fires through Radix's `onOpenChange` and choosing an upload destination
calls `closeModal()` directly.
2026-09-01 12:56:03 -04:00
..
__tests__
Agents 📭 fix: Detect Agent List Pages in useHasData (#15156) 2026-08-24 02:45:59 -04:00
Appearance 🔇 refactor: Quiet Framework Logging in Unit Tests (#15363) 2026-08-30 15:26:30 -04:00
Artifacts
Audio 🧹 chore: Sort Client Imports Left Behind by the Import Order Gate (#15139) 2026-08-23 15:18:05 -04:00
Auth 🔐 fix: Redirect OAuth Browser Navigations Instead of Rendering JSON (#15440) 2026-08-31 21:13:47 -04:00
Banners
Bookmarks 🎛️ feat: Consistent Dialogs, Clearer Settings, and a Keyboard Shortcuts Switch (#14882) 2026-08-16 16:10:17 -04:00
Chat 🫴 fix: Hand Composer Focus Back After Upload Dialogs (#15469) 2026-09-01 12:56:03 -04:00
Conversations 🧵 fix: Retry Shared Links After Message Persistence Gaps (#15306) 2026-08-28 08:05:52 -04:00
Endpoints 🧮 fix: Render Google Settings From the Shared Schema and Bound Them Per Model (#14989) 2026-08-25 21:21:28 -04:00
Files
Input 🌐 fix: Expose Gemini Models to Vertex AI Agents (#15234) 2026-08-27 06:50:23 -04:00
Insights 💡 feat: add DB-backed admin insights (#14898) 2026-08-18 07:51:51 -04:00
MCP 🪡 fix: Thread Parent Message ID Through MCP Request-Scoped Bodies (#15095) 2026-08-21 16:33:01 -04:00
MCPUIResource
Messages 🧴 fix: Strip LangChain URLs From Provider Errors (#15421) 2026-08-31 12:51:34 -04:00
Nav 🔇 refactor: Quiet Framework Logging in Unit Tests (#15363) 2026-08-30 15:26:30 -04:00
OAuth
Plugins/Store
Projects 🕰️ feat: Clock Format and Week Start Preferences (#15121) 2026-08-23 18:41:14 -04:00
Prompts 🕰️ feat: Clock Format and Week Start Preferences (#15121) 2026-08-23 18:41:14 -04:00
Share 🔌 refactor: Give the Subagent Surface a Host Seam and Its Own Jotai State (#15455) 2026-09-01 11:15:42 -04:00
SharePoint
Sharing 🧳 feat: Register Principal-Owned Code Environments (#15365) 2026-08-30 19:33:19 -04:00
SidePanel 🧰 fix: Keep File-Backed Agent Capabilities and Their Saved Tools in Agreement (#15418) 2026-08-31 09:47:32 -04:00
Skills ✨ refactor: Presets, Skills Motion and Model Selector Polish (#14953) 2026-08-19 15:49:47 -04:00
System
Tools
ui ✂️ fix: Unclip the Share Dialog's Public Role Menu (#15177) 2026-08-24 20:59:07 -04:00
UnifiedSidebar ✏️ feat: Edit Pasted Text and Clear It on New Chat (#15017) 2026-08-25 20:06:59 -04:00
Variables 🗓️ fix: Hide Unsupported Schedule Variables (#15053) 2026-08-20 18:33:00 -04:00
Web 📄 fix: Serve Stored Text for "Upload as Text" File Downloads (#14723) 2026-08-21 14:24:43 -04:00
index.ts
QueryDevtoolsGate.tsx