Skip to content

IsOperation method do not handle the custom operations #5977

@righetn

Description

@righetn

Description
We've been using custom operations introduced in this pr -> #4708

When upgrading slate and slate-dom from v112 to v118, we had some exceptions trigged on action using custom operation
After digging in the codebase, we noticed the function isEditor needs every operation to be valid to return true
But the extended operation are not included in the validation

It means if my custom operation is in the editor object when isEditor function is called, then it will return false
This makes DOMEditor.findPath to throw an exception

Expectation
Custom operation to be handle by isOperation

Environment

  • Slate Version: 0.118.1
  • Operating System: OSX
  • Browser: Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions