1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-10 22:11:50 +02:00

Windows: Rich Text Editor: Fix dropping a URL from the Firefox addressbar inserts nothing (#12282)

This commit is contained in:
Henry Heino
2025-05-19 14:55:42 -07:00
committed by GitHub
parent 12c688eb83
commit 465defb194

View File

@@ -62,18 +62,20 @@ export default function useDropHandler(dependencies: HookDependencies): DropHand
paths.push(path);
}
const props: DropCommandValue = {
type: 'files',
pos: eventPosition,
paths: paths,
createFileURL: createFileURL,
};
if (paths.length > 0) {
const props: DropCommandValue = {
type: 'files',
pos: eventPosition,
paths: paths,
createFileURL: createFileURL,
};
editorRef.current.execCommand({
name: 'dropItems',
value: props,
});
return true;
editorRef.current.execCommand({
name: 'dropItems',
value: props,
});
return true;
}
}
return false;