diff --git a/src/admin/components/forms/field-types/RichText/elements/isListActive.ts b/src/admin/components/forms/field-types/RichText/elements/isListActive.ts index 8ccec72d87..7b1ab65389 100644 --- a/src/admin/components/forms/field-types/RichText/elements/isListActive.ts +++ b/src/admin/components/forms/field-types/RichText/elements/isListActive.ts @@ -5,7 +5,9 @@ const isListActive = (editor: Editor, format: string): boolean => { // If focus or anchor is at root of editor, // Return false - as Editor.parent will fail || editor.selection.focus.path[1] === 0 + // || editor.selection.focus.path.length === 0 || editor.selection.anchor.path[1] === 0 + // || editor.selection.anchor.path.length === 0 ) return false; const parentLI = Editor.parent(editor, editor.selection); diff --git a/src/admin/components/forms/field-types/RichText/elements/li/index.tsx b/src/admin/components/forms/field-types/RichText/elements/li/index.tsx index c8ec60cb7c..75f5c81aad 100644 --- a/src/admin/components/forms/field-types/RichText/elements/li/index.tsx +++ b/src/admin/components/forms/field-types/RichText/elements/li/index.tsx @@ -3,7 +3,7 @@ import listTypes from '../listTypes'; const LI = (props) => { const { attributes, element, children } = props; - const disableListStyle = element.children.length === 1 && listTypes.includes(element.children?.[0]?.type); + const disableListStyle = element.children.length >= 1 && listTypes.includes(element.children?.[0]?.type); return (