diff --git a/src/components/App.tsx b/src/components/App.tsx index 5bb8d1c13..a2118d914 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -409,7 +409,6 @@ class App extends React.Component { onPointerUp={this.removePointer} onPointerCancel={this.removePointer} onTouchMove={this.handleTouchMove} - onDrop={this.handleCanvasOnDrop} > {t("labels.drawingCanvas")} @@ -440,6 +439,7 @@ class App extends React.Component { "excalidraw--view-mode": viewModeEnabled, })} ref={this.excalidrawContainerRef} + onDrop={this.handleAppOnDrop} > { } }; - private handleCanvasOnDrop = async ( - event: React.DragEvent, - ) => { + private handleAppOnDrop = async (event: React.DragEvent) => { try { const file = event.dataTransfer.files[0]; if (file?.type === "image/png" || file?.type === "image/svg+xml") {