You've already forked joplin
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:
@@ -62,18 +62,20 @@ export default function useDropHandler(dependencies: HookDependencies): DropHand
|
|||||||
paths.push(path);
|
paths.push(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
const props: DropCommandValue = {
|
if (paths.length > 0) {
|
||||||
type: 'files',
|
const props: DropCommandValue = {
|
||||||
pos: eventPosition,
|
type: 'files',
|
||||||
paths: paths,
|
pos: eventPosition,
|
||||||
createFileURL: createFileURL,
|
paths: paths,
|
||||||
};
|
createFileURL: createFileURL,
|
||||||
|
};
|
||||||
|
|
||||||
editorRef.current.execCommand({
|
editorRef.current.execCommand({
|
||||||
name: 'dropItems',
|
name: 'dropItems',
|
||||||
value: props,
|
value: props,
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user