Issues with gapCursor


I’m currently working on an extension (3 new node types in fact) and having issues with gapCursor. Here’s more details on my setup:

Let’s call my extensions:

  • wrapper (content: ‘header panel’)
  • header (content: ‘block*’)
  • panel (content: ‘block*’)

I’m using latest tiptap2 packages.

When inserting new content, it’s like this:

  type: 'wrapper',
  content: [
      type: 'header',
      content: ...
      type: 'panel',
      content: ...

All node types have the following properties:

  • isolating: true
  • allowGapCursor: false
  • selectable: false

My issue is that in 3 different scenarios, I’m still getting a gapCursor (even if allowGapCursor is false), but as soon as this gapCursor appears, it breaks the editor, everything stops working, I need to reload to fix it. These scenarios are:

  • If my wrapper node is the first node of the document and I do “arrow up” or “arrow left”
  • If my wrapper node is the last node of the document and I try to go further down
  • If I have 2 consecutive wrapper nodes, when traversing from one to the other using the arrows

When the editor breaks, I get the following trace Uncaught TypeError: this.widget.type.destroy is not a function
    at WidgetViewDesc.destroy (
    at ViewTreeUpdater.destroyBetween (
    at ViewTreeUpdater.updateNextNode (
    at eval (
    at iterDeco (
    at NodeViewDesc.updateChildren (
    at NodeViewDesc.updateInner (
    at NodeViewDesc.update (
    at EditorView.updateStateInner (
    at EditorView.updateState (

anyone have an idea about what I’m doing wrong / what I can do to fix this?

Thanks a lot!

Could you set up a minimal example script that I can use to reproduce this error?


After some testing, I can tell that the issue occurs when “isolating” is “true”. If this is false, no gapCursor issues. I’m wondering if this can be caused by the fact that I’m within node-view-wrapper nodes (vue2) …?

For now, I went around the issue by keeping isolating to false and implementing isolating for my extension by myself (using addKeyboardShortcuts)

I’ll still try to make a codepen to reproduce the issue as I’d like to know the real issue behind that.