diff --git a/app/editor/components/FindAndReplace.tsx b/app/editor/components/FindAndReplace.tsx index ffb5a1bf4..6ec0e42a5 100644 --- a/app/editor/components/FindAndReplace.tsx +++ b/app/editor/components/FindAndReplace.tsx @@ -30,7 +30,9 @@ type Props = { export default function FindAndReplace({ readOnly }: Props) { const editor = useEditor(); - const finalFocusRef = React.useRef(editor.view.dom); + const finalFocusRef = React.useRef( + editor.view.dom.parentElement + ); const selectionRef = React.useRef(); const inputRef = React.useRef(null); const { t } = useTranslation();