Skip to content
Snippets Groups Projects
Commit 24a312bd authored by chris's avatar chris
Browse files

fix title enter

parent 294c062b
No related branches found
No related tags found
1 merge request!231Connect funcionality
...@@ -72,10 +72,18 @@ const pressEnter = (state, dispatch) => { ...@@ -72,10 +72,18 @@ const pressEnter = (state, dispatch) => {
state.config.schema.nodes.title, state.config.schema.nodes.title,
true, true,
); );
if (state.selection.from === title[0].node.nodeSize - 1) { if (
title.length === 1 &&
state.selection.from === title[0].node.nodeSize - 1
) {
return false; return false;
} }
return true; if (
title.length === 1 &&
state.selection.ranges[0].$from.parent.type.name === 'title'
) {
return true;
}
} }
return false; return false;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment