mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 06:03:22 +08:00
fix: improve active mark detection for inline nodes, fix #1893
This commit is contained in:
parent
80570e2805
commit
6437790431
@ -30,7 +30,7 @@ export default function isMarkActive(
|
||||
let markRanges: MarkRange[] = []
|
||||
|
||||
state.doc.nodesBetween(from, to, (node, pos) => {
|
||||
if (node.isText) {
|
||||
if (node.isText || node.marks.length) {
|
||||
const relativeFrom = Math.max(from, pos)
|
||||
const relativeTo = Math.min(to, pos + node.nodeSize)
|
||||
const range = relativeTo - relativeFrom
|
||||
|
Loading…
Reference in New Issue
Block a user