VueNodeViewRenderer should return null for contentDOM for a non-leaf node with no NodeViewContent (#6277)

* (Vue2)VueNodeViewRenderer should return null for contentDOM for a non-leaf node with no NodeViewContent

* chore: add changeset

* Update .changeset/olive-jeans-love.md

patch -> major

Co-authored-by: bdbch <6538827+bdbch@users.noreply.github.com>

---------

Co-authored-by: zhangchuanfeng <791230189@qq.com>
Co-authored-by: bdbch <6538827+bdbch@users.noreply.github.com>
This commit is contained in:
Chuck 2025-04-18 21:18:53 +08:00 committed by GitHub
parent 7627150371
commit 3d67595777
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
"@tiptap/vue-2": major
---
VueNodeViewRenderer should return `null` for `contentDOM` for a non-leaf node with no `NodeViewContent`

View File

@ -105,9 +105,7 @@ class VueNodeView extends NodeView<Vue | VueConstructor, Editor, VueNodeViewRend
return null
}
const contentElement = this.dom.querySelector('[data-node-view-content]')
return (contentElement || this.dom) as HTMLElement | null
return this.dom.querySelector('[data-node-view-content]') as HTMLElement | null
}
/**