prosemirror-view
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "prosemirror-view", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -28,5 +28,7 @@ import {Selection, NodeSelection, TextSelection} from "prosemirror-state" | ||
let $head = sel.$head, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter, desc | ||
if (node && NodeSelection.isSelectable(node) && | ||
(node.isAtom || (desc = view.docView.descAt($head.pos)) && !desc.contentDOM)) | ||
return apply(view, new NodeSelection(dir < 0 ? view.state.doc.resolve($head.pos - node.nodeSize) : $head)) | ||
if (node && NodeSelection.isSelectable(node)) { | ||
let nodePos = dir < 0 ? $head.pos - node.nodeSize : $head.pos | ||
if (node.isAtom || (desc = view.docView.descAt(nodePos)) && !desc.contentDOM) | ||
return apply(view, new NodeSelection(dir < 0 ? view.state.doc.resolve($head.pos - node.nodeSize) : $head)) | ||
} | ||
return false | ||
@@ -33,0 +35,0 @@ } |
@@ -228,3 +228,3 @@ import {Mark} from "prosemirror-model" | ||
if (this.inDOMChange && pos) { | ||
pos.pos = this.inDOMChange.mapping.map(pos) | ||
pos.pos = this.inDOMChange.mapping.map(pos.pos) | ||
if (pos.inside != -1) pos.inside = this.inDOMChange.mapping.map(pos.inside) | ||
@@ -231,0 +231,0 @@ } |
Sorry, the diff of this file is too big to display
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
682180
8091