Skip to content

regression: v0.117.0 seems to break removeNodes #5927

@dez1729

Description

@dez1729

When I try removing a node with Transforms.removeNodes(editor, { at: path }); and path: [0, 5] here is valid and done with ReactEditor.findPath(editor, element).
The error I'm getting would be

Image

Worked prior to 0.117.0. The snippet that caused the issue seems to be from position.ts as a result of #5885:

      if (!editor.isSelectable(node)) {
        /**
         * If the node is not selectable, skip it
         */
        if (reverse) {
          yield Editor.end(editor, Path.previous(path))
          continue
        } else {
          yield Editor.start(editor, Path.next(path))
          continue
        }
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions