fix: Padding below editor not clickable

This commit is contained in:
Tom Moor
2022-11-16 23:37:29 -05:00
parent 552c0ecf01
commit 924b554281

View File

@@ -178,8 +178,8 @@ function Editor(props: Props, ref: React.RefObject<SharedEditor> | null) {
); );
const focusAtEnd = React.useCallback(() => { const focusAtEnd = React.useCallback(() => {
ref?.current?.focusAtEnd(); localRef?.current?.focusAtEnd();
}, [ref]); }, [localRef]);
const handleDrop = React.useCallback( const handleDrop = React.useCallback(
(event: React.DragEvent<HTMLDivElement>) => { (event: React.DragEvent<HTMLDivElement>) => {
@@ -187,7 +187,7 @@ function Editor(props: Props, ref: React.RefObject<SharedEditor> | null) {
event.stopPropagation(); event.stopPropagation();
const files = getDataTransferFiles(event); const files = getDataTransferFiles(event);
const view = ref?.current?.view; const view = localRef?.current?.view;
if (!view) { if (!view) {
return; return;
} }
@@ -231,7 +231,7 @@ function Editor(props: Props, ref: React.RefObject<SharedEditor> | null) {
}); });
}, },
[ [
ref, localRef,
props.onFileUploadStart, props.onFileUploadStart,
props.onFileUploadStop, props.onFileUploadStop,
dictionary, dictionary,