Skip to content

Commit 1440436

Browse files
committed
Allow createParagraphNear to fire for gap cursors
FIX: Fix a regression where `createParagraphNear` no longer fired for gap cursor selections. Closes ProseMirror/prosemirror#1136
1 parent 91f86b3 commit 1440436

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export function exitCode(state, dispatch) {
261261
// it is its parent's first child) or after it.
262262
export function createParagraphNear(state, dispatch) {
263263
let sel = state.selection, {$from, $to} = sel
264-
if (!(sel instanceof NodeSelection) || $from.parent.inlineContent) return false
264+
if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent) return false
265265
let type = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter()))
266266
if (!type || !type.isTextblock) return false
267267
if (dispatch) {

0 commit comments

Comments
 (0)