Skip to content
Snippets Groups Projects
Commit 130fc211 authored by chris's avatar chris
Browse files

fix title enter

parent 8b2b8ea3
No related branches found
No related tags found
No related merge requests found
...@@ -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