@tiptap/extension-list-keymap
Advanced tools
Comparing version 2.10.2 to 2.10.3
@@ -163,2 +163,9 @@ import { getNodeType, getNodeAtPosition, isNodeActive, isAtStartOfNode, isAtEndOfNode, Extension } from '@tiptap/core'; | ||
} | ||
// if the selection is not collapsed, or not within a single node | ||
// do nothing and proceed | ||
const { selection } = editor.state; | ||
const { $from, $to } = selection; | ||
if (!selection.empty && $from.sameParent($to)) { | ||
return false; | ||
} | ||
// check if the next node is a list with a deeper depth | ||
@@ -165,0 +172,0 @@ if (nextListIsDeeper(name, editor.state)) { |
@@ -167,2 +167,9 @@ (function (global, factory) { | ||
} | ||
// if the selection is not collapsed, or not within a single node | ||
// do nothing and proceed | ||
const { selection } = editor.state; | ||
const { $from, $to } = selection; | ||
if (!selection.empty && $from.sameParent($to)) { | ||
return false; | ||
} | ||
// check if the next node is a list with a deeper depth | ||
@@ -169,0 +176,0 @@ if (nextListIsDeeper(name, editor.state)) { |
{ | ||
"name": "@tiptap/extension-list-keymap", | ||
"description": "list keymap extension for tiptap", | ||
"version": "2.10.2", | ||
"version": "2.10.3", | ||
"homepage": "https://tiptap.dev", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@tiptap/core": "^2.10.2" | ||
"@tiptap/core": "^2.10.3" | ||
}, | ||
@@ -35,0 +35,0 @@ "peerDependencies": { |
@@ -19,2 +19,11 @@ import { Editor, isAtEndOfNode, isNodeActive } from '@tiptap/core' | ||
// if the selection is not collapsed, or not within a single node | ||
// do nothing and proceed | ||
const { selection } = editor.state | ||
const { $from, $to } = selection | ||
if (!selection.empty && $from.sameParent($to)) { | ||
return false | ||
} | ||
// check if the next node is a list with a deeper depth | ||
@@ -21,0 +30,0 @@ if (nextListIsDeeper(name, editor.state)) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109910
1226