prosemirror-view
Advanced tools
Comparing version 1.31.5 to 1.31.6
{ | ||
"name": "prosemirror-view", | ||
"version": "1.31.5", | ||
"version": "1.31.6", | ||
"description": "ProseMirror's view component", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -56,3 +56,3 @@ import {EditorState} from "prosemirror-state" | ||
} | ||
if (atTop) break | ||
if (atTop || /^(fixed|sticky)$/.test(getComputedStyle(parent as HTMLElement).position)) break | ||
} | ||
@@ -231,3 +231,3 @@ } | ||
} | ||
if (!desc.contentDOM && outsideBlock < 0) { | ||
if (!desc.contentDOM && outsideBlock < 0 && !desc.node.isText) { | ||
// If we are inside a leaf, return the side of the leaf closer to the coords | ||
@@ -234,0 +234,0 @@ let before = desc.node.isBlock ? coords.top < (rect.top + rect.bottom) / 2 |
@@ -565,3 +565,3 @@ import {DOMSerializer, Fragment, Mark, Node, ParseRule} from "prosemirror-model" | ||
class MarkViewDesc extends ViewDesc { | ||
constructor(parent: ViewDesc, readonly mark: Mark, dom: DOMNode, contentDOM: HTMLElement | null) { | ||
constructor(parent: ViewDesc, readonly mark: Mark, dom: DOMNode, contentDOM: HTMLElement) { | ||
super(parent, [], dom, contentDOM) | ||
@@ -580,3 +580,3 @@ } | ||
if ((this.dirty & NODE_DIRTY) || this.mark.type.spec.reparseInView) return null | ||
return {mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM || undefined} | ||
return {mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM!} | ||
} | ||
@@ -583,0 +583,0 @@ |
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
828694