1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #3302: Prevent drag and dropping of text in editor as it can lead to data loss

This commit is contained in:
Laurent Cozic 2020-06-01 21:30:51 +00:00
parent 468261906a
commit a75db94da5

View File

@ -477,6 +477,12 @@ function AceEditor(props: NoteBodyEditorProps, ref: any) {
};
}, [editor, onEditorPaste, onEditorContextMenu, lastKeys]);
useEffect(() => {
// We disable dragging ot text because it's not really supported, and
// can lead to data loss: https://github.com/laurent22/joplin/issues/3302
if (editor) editor.setOption('dragEnabled', false);
}, [editor]);
const webview_domReady = useCallback(() => {
setWebviewReady(true);
}, []);