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/package.json
CHANGED
package/src/selection.js
CHANGED
|
@@ -42,7 +42,10 @@ export function selectionToDOM(view, force) {
|
|
|
42
42
|
|
|
43
43
|
if (!editorOwnsSelection(view)) return
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
// The delayed drag selection causes issues with Cell Selections
|
|
46
|
+
// in Safari. And the drag selection delay is to workarond issues
|
|
47
|
+
// which only present in Chrome.
|
|
48
|
+
if (!force && view.mouseDown && view.mouseDown.allowDefault && browser.chrome) {
|
|
46
49
|
let domSel = view.root.getSelection(), curSel = view.domObserver.currentSelection
|
|
47
50
|
if (domSel.anchorNode && isEquivalentPosition(domSel.anchorNode, domSel.anchorOffset,
|
|
48
51
|
curSel.anchorNode, curSel.anchorOffset)) {
|
package/src/viewdesc.js
CHANGED
|
@@ -462,7 +462,8 @@ class ViewDesc {
|
|
|
462
462
|
else child.markDirty(from - startInside, to - startInside)
|
|
463
463
|
return
|
|
464
464
|
} else {
|
|
465
|
-
child.dirty = child.dom == child.contentDOM && child.dom.parentNode == this.contentDOM
|
|
465
|
+
child.dirty = child.dom == child.contentDOM && child.dom.parentNode == this.contentDOM && !child.children.length
|
|
466
|
+
? CONTENT_DIRTY : NODE_DIRTY
|
|
466
467
|
}
|
|
467
468
|
}
|
|
468
469
|
offset = end
|
|
@@ -577,7 +578,10 @@ class MarkViewDesc extends ViewDesc {
|
|
|
577
578
|
return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom)
|
|
578
579
|
}
|
|
579
580
|
|
|
580
|
-
parseRule() {
|
|
581
|
+
parseRule() {
|
|
582
|
+
if ((this.dirty & NODE_DIRTY) || this.mark.type.spec.reparseInView) return null
|
|
583
|
+
return {mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM}
|
|
584
|
+
}
|
|
581
585
|
|
|
582
586
|
matchesMark(mark) { return this.dirty != NODE_DIRTY && this.mark.eq(mark) }
|
|
583
587
|
|