diff --git a/src/serlo-editor/core/sub-document/editor.tsx b/src/serlo-editor/core/sub-document/editor.tsx index 632ff3d35e..38036bb533 100644 --- a/src/serlo-editor/core/sub-document/editor.tsx +++ b/src/serlo-editor/core/sub-document/editor.tsx @@ -37,6 +37,10 @@ export function SubDocumentEditor({ id, pluginProps }: SubDocumentProps) { const parent = selectChildTreeOfParent(store.getState(), id) if (parent) dispatch(focus(parent.id)) } else { + // prevents parents from stealing focus of children + if (document?.plugin === 'exercise') return + + // default focus dispatch dispatch(focus(id)) } } diff --git a/src/serlo-editor/plugins/anchor/editor.tsx b/src/serlo-editor/plugins/anchor/editor.tsx index d899a824d8..ed5f6fa6ee 100644 --- a/src/serlo-editor/plugins/anchor/editor.tsx +++ b/src/serlo-editor/plugins/anchor/editor.tsx @@ -25,6 +25,7 @@ export const AnchorEditor = (props: AnchorProps) => {