From e3ec8503a52f7d2baadf7096ddeab639da178b04 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Tue, 29 Nov 2022 00:12:10 +0530 Subject: [PATCH] refactor: use ClipboardEvent interface for file paste command --- .../SuperEditor/Plugins/EncryptedFilePlugin/FilePlugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/javascripts/Components/NoteView/SuperEditor/Plugins/EncryptedFilePlugin/FilePlugin.ts b/packages/web/src/javascripts/Components/NoteView/SuperEditor/Plugins/EncryptedFilePlugin/FilePlugin.ts index 042a9ec09..6fb824333 100644 --- a/packages/web/src/javascripts/Components/NoteView/SuperEditor/Plugins/EncryptedFilePlugin/FilePlugin.ts +++ b/packages/web/src/javascripts/Components/NoteView/SuperEditor/Plugins/EncryptedFilePlugin/FilePlugin.ts @@ -59,7 +59,7 @@ export default function FilePlugin(): JSX.Element | null { editor.registerCommand( PASTE_COMMAND, (payload) => { - const files = payload instanceof InputEvent ? payload.dataTransfer?.files : null + const files = payload instanceof ClipboardEvent ? payload.clipboardData?.files : null if (files?.length) { uploadFilesList(files) return true