Desktop: Attempt to fix Outlook drag and drop on Markdown editor (#4093)

pull/4109/head
Caleb John 2020-11-16 13:30:40 -07:00 committed by GitHub
parent bb8cac2b2f
commit 92bcb25ef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -142,6 +142,8 @@ function Editor(props: EditorProps, ref: any) {
const coords = cm.coordsChar({ left: event.x, top: event.y });
cm.setCursor(coords);
}
event.dataTransfer.dropEffect = 'copy';
}, []);
useEffect(() => {

View File

@ -10,7 +10,6 @@ export default function useDropHandler(dependencies: HookDependencies) {
return useCallback(async (event: any) => {
const dt = event.dataTransfer;
dt.dropEffect = 'copy';
const createFileURL = event.altKey;
if (dt.types.indexOf('text/x-jop-note-ids') >= 0) {