Uncaught TypeError: this.view.state.selection.eq is not a function

Using the github head I got this

Uncaught TypeError: this.view.state.selection.eq is not a function
    at SelectionReader.readFromDOM (bundle_pm.js:12550)
    at HTMLDocument.SelectionChangePoller.readFunc (bundle_pm.js:12569)

If I inspect this.view.state.selection in the debugger, it is indeed a Selection object but does not have an eq method

Ok in the code I see that Selection “Should not be instantiated directly”

Would be good if the code warns / breaks in this case

Also the ref here https://prosemirror.net/docs/ref/#state.Selection should be updated

thx!

1 Like