diff options
| author | Jacob Richman <[email protected]> | 2025-07-25 20:26:13 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-25 20:26:13 +0000 |
| commit | de968877895a8ae5f0edb83a43b37fa190cc8ec9 (patch) | |
| tree | 5670176f9e197a73fdc40f82b37861238543515d /packages/cli/src/ui/components/InputPrompt.tsx | |
| parent | 13b09712917c13bf32113aac86c6fbdc31bce187 (diff) | |
Fix bugs breaking drag and drop of files. (#4887)
Co-authored-by: matt korwel <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/components/InputPrompt.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/InputPrompt.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index 9f15b56d..8d296dc4 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -164,7 +164,8 @@ export const InputPrompt: React.FC<InputPromptProps> = ({ const handleInput = useCallback( (key: Key) => { - if (!focus) { + /// We want to handle paste even when not focused to support drag and drop. + if (!focus && !key.paste) { return; } @@ -349,7 +350,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({ ], ); - useKeypress(handleInput, { isActive: focus }); + useKeypress(handleInput, { isActive: true }); const linesToRender = buffer.viewportVisualLines; const [cursorVisualRowAbsolute, cursorVisualColAbsolute] = |
