From 924b554281e028dd9c928cbabfcd8fbde49ebb9b Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 16 Nov 2022 23:37:29 -0500 Subject: [PATCH] fix: Padding below editor not clickable --- app/components/Editor.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/Editor.tsx b/app/components/Editor.tsx index b16571c70..67f86a73d 100644 --- a/app/components/Editor.tsx +++ b/app/components/Editor.tsx @@ -178,8 +178,8 @@ function Editor(props: Props, ref: React.RefObject | null) { ); const focusAtEnd = React.useCallback(() => { - ref?.current?.focusAtEnd(); - }, [ref]); + localRef?.current?.focusAtEnd(); + }, [localRef]); const handleDrop = React.useCallback( (event: React.DragEvent) => { @@ -187,7 +187,7 @@ function Editor(props: Props, ref: React.RefObject | null) { event.stopPropagation(); const files = getDataTransferFiles(event); - const view = ref?.current?.view; + const view = localRef?.current?.view; if (!view) { return; } @@ -231,7 +231,7 @@ function Editor(props: Props, ref: React.RefObject | null) { }); }, [ - ref, + localRef, props.onFileUploadStart, props.onFileUploadStop, dictionary,