Fix bugs breaking drag and drop of files. (#4887)

Co-authored-by: matt korwel <matt.korwel@gmail.com>
This commit is contained in:
Jacob Richman
2025-07-25 20:26:13 +00:00
committed by GitHub
parent 13b0971291
commit de96887789
3 changed files with 32 additions and 27 deletions

View File

@@ -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] =