Horizontal rule bug

to reproduce

open debugger with pause on exceptions go to basic demo delete everything insert horizontal rule click above or on the rule

I get exception:

prosemirror.js:5678 Uncaught RangeError: Searching for selection in invalid document doc(horizontal_rule) at Function.near (prosemirror.js:5678) at Function.between (prosemirror.js:5796) at selectionBetween (prosemirror.js:10852) at SelectionReader.readFromDOM (prosemirror.js:10670) at HTMLDocument.SelectionChangePoller.readFunc (prosemirror.js:10693)

I can’t reproduce this in my setup. Did you by any chance make horizontal rule nodes non-selectable?

Hmmm, I didn’t change anything I’m looking at the editors in https://prosemirror.net/ and https://prosemirror.net/examples/basic/

I do ctrl+a and del then insert -> horizontal rule then click anywhere below the menubar and above the horizontal rule created or on the middle of the horizontal rule or sometime even below the line.

using latest chrome.

Ah, I can reproduce this now. The issue is that TextSelection.between can’t produce a text selection in some documents. I’ve adjusted it to fall back to a node selection in this case in 7acf76f817f.