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

pull/3305/head
Laurent Cozic 2020-06-01 21:30:51 +00:00
parent 468261906a
commit a75db94da5
1 changed files with 6 additions and 0 deletions

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);
}, []);