prosemirror-view
Advanced tools
Comparing version 1.33.7 to 1.33.8
{ | ||
"name": "prosemirror-view", | ||
"version": "1.33.7", | ||
"version": "1.33.8", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -46,2 +46,3 @@ import {Selection} from "prosemirror-state" | ||
suppressingSelectionUpdates = false | ||
lastChangedTextNode: Text | null = null | ||
@@ -239,3 +240,7 @@ constructor( | ||
if (mut.type == "childList") { | ||
for (let i = 0; i < mut.addedNodes.length; i++) added.push(mut.addedNodes[i]) | ||
for (let i = 0; i < mut.addedNodes.length; i++) { | ||
let node = mut.addedNodes[i] | ||
added.push(node) | ||
if (node.nodeType == 3) this.lastChangedTextNode = node as Text | ||
} | ||
if (desc.contentDOM && desc.contentDOM != desc.dom && !desc.contentDOM.contains(mut.target)) | ||
@@ -263,2 +268,3 @@ return {from: desc.posBefore, to: desc.posAfter} | ||
} else { // "characterData" | ||
this.lastChangedTextNode = mut.target as Text | ||
return { | ||
@@ -265,0 +271,0 @@ from: desc.posAtStart, |
@@ -520,3 +520,4 @@ import {Selection, NodeSelection, TextSelection} from "prosemirror-state" | ||
if (textBefore && textAfter && textBefore != textAfter) { | ||
let descAfter = textAfter.pmViewDesc | ||
let descAfter = textAfter.pmViewDesc, lastChanged = view.domObserver.lastChangedTextNode | ||
if (textBefore == lastChanged || textAfter == lastChanged) return lastChanged | ||
if (!descAfter || !descAfter.isText(textAfter.nodeValue!)) { | ||
@@ -523,0 +524,0 @@ return textAfter |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
858058
17333