prosemirror-gapcursor
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -0,1 +1,7 @@ | ||
## 1.1.5 (2020-04-05) | ||
### Bug fixes | ||
Fix an issue where the gap cursor plugin would sometimes cause perfectly selectable content to be skipped when moving the selection with the arrow keys. | ||
## 1.1.4 (2020-03-20) | ||
@@ -2,0 +8,0 @@ |
@@ -70,6 +70,8 @@ import { keydownHandler } from 'prosemirror-keymap'; | ||
if (!inside) { | ||
if (NodeSelection.isSelectable(next)) { break } | ||
$pos = $pos.doc.resolve(pos + next.nodeSize * dir); | ||
mustMove = false; | ||
continue search | ||
if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) { | ||
$pos = $pos.doc.resolve(pos + next.nodeSize * dir); | ||
mustMove = false; | ||
continue search | ||
} | ||
break | ||
} | ||
@@ -76,0 +78,0 @@ next = inside; |
@@ -74,6 +74,8 @@ 'use strict'; | ||
if (!inside) { | ||
if (prosemirrorState.NodeSelection.isSelectable(next)) { break } | ||
$pos = $pos.doc.resolve(pos + next.nodeSize * dir); | ||
mustMove = false; | ||
continue search | ||
if (next.isAtom && !next.isText && !prosemirrorState.NodeSelection.isSelectable(next)) { | ||
$pos = $pos.doc.resolve(pos + next.nodeSize * dir); | ||
mustMove = false; | ||
continue search | ||
} | ||
break | ||
} | ||
@@ -80,0 +82,0 @@ next = inside; |
{ | ||
"name": "prosemirror-gapcursor", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "ProseMirror plugin for cursors at normally impossible-to-reach positions", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -65,6 +65,8 @@ import {Selection, NodeSelection} from "prosemirror-state" | ||
if (!inside) { | ||
if (NodeSelection.isSelectable(next)) break | ||
$pos = $pos.doc.resolve(pos + next.nodeSize * dir) | ||
mustMove = false | ||
continue search | ||
if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) { | ||
$pos = $pos.doc.resolve(pos + next.nodeSize * dir) | ||
mustMove = false | ||
continue search | ||
} | ||
break | ||
} | ||
@@ -71,0 +73,0 @@ next = inside |
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
57822
554