prosemirror-view 1.23.5 → 1.23.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/index.es.js +10 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/selection.js +4 -1
- package/src/viewdesc.js +6 -2
package/dist/index.js
CHANGED
|
@@ -1055,7 +1055,8 @@ ViewDesc.prototype.markDirty = function markDirty (from, to) {
|
|
|
1055
1055
|
else { child.markDirty(from - startInside, to - startInside); }
|
|
1056
1056
|
return
|
|
1057
1057
|
} else {
|
|
1058
|
-
child.dirty = child.dom == child.contentDOM && child.dom.parentNode == this.contentDOM
|
|
1058
|
+
child.dirty = child.dom == child.contentDOM && child.dom.parentNode == this.contentDOM && !child.children.length
|
|
1059
|
+
? CONTENT_DIRTY : NODE_DIRTY;
|
|
1059
1060
|
}
|
|
1060
1061
|
}
|
|
1061
1062
|
offset = end;
|
|
@@ -1193,7 +1194,10 @@ var MarkViewDesc = /*@__PURE__*/(function (ViewDesc) {
|
|
|
1193
1194
|
return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom)
|
|
1194
1195
|
};
|
|
1195
1196
|
|
|
1196
|
-
MarkViewDesc.prototype.parseRule = function parseRule () {
|
|
1197
|
+
MarkViewDesc.prototype.parseRule = function parseRule () {
|
|
1198
|
+
if ((this.dirty & NODE_DIRTY) || this.mark.type.spec.reparseInView) { return null }
|
|
1199
|
+
return {mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM}
|
|
1200
|
+
};
|
|
1197
1201
|
|
|
1198
1202
|
MarkViewDesc.prototype.matchesMark = function matchesMark (mark) { return this.dirty != NODE_DIRTY && this.mark.eq(mark) };
|
|
1199
1203
|
|
|
@@ -2152,7 +2156,10 @@ function selectionToDOM(view, force) {
|
|
|
2152
2156
|
|
|
2153
2157
|
if (!editorOwnsSelection(view)) { return }
|
|
2154
2158
|
|
|
2155
|
-
|
|
2159
|
+
// The delayed drag selection causes issues with Cell Selections
|
|
2160
|
+
// in Safari. And the drag selection delay is to workarond issues
|
|
2161
|
+
// which only present in Chrome.
|
|
2162
|
+
if (!force && view.mouseDown && view.mouseDown.allowDefault && result.chrome) {
|
|
2156
2163
|
var domSel = view.root.getSelection(), curSel = view.domObserver.currentSelection;
|
|
2157
2164
|
if (domSel.anchorNode && isEquivalentPosition(domSel.anchorNode, domSel.anchorOffset,
|
|
2158
2165
|
curSel.anchorNode, curSel.anchorOffset)) {
|