fix: Closing find and replace on long document jumps to end

This commit is contained in:
Tom Moor
2023-08-03 22:41:49 -04:00
parent 5b67273d8f
commit d1a7a30c00

View File

@@ -30,7 +30,9 @@ type Props = {
export default function FindAndReplace({ readOnly }: Props) {
const editor = useEditor();
const finalFocusRef = React.useRef<HTMLElement>(editor.view.dom);
const finalFocusRef = React.useRef<HTMLElement>(
editor.view.dom.parentElement
);
const selectionRef = React.useRef<string | undefined>();
const inputRef = React.useRef<HTMLInputElement>(null);
const { t } = useTranslation();