[Bug]: Cannot insert horizontal rule at end of document #5907
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Type: Bug
The issue or pullrequest is related to a bug
Affected Packages
extension-horizontal-rule
Version(s)
2.7.x -
Bug Description
When inserting a horizontal rule at the end of the document with
editor.chain().focus().setHorizontalRule().run()
a out of range error is thrown and the horizontal rule is not added to the document.
Uncaught RangeError: Position 40 out of range
Other commands - setHeading, etc. - work.
Browser Used
Chrome
Code Example URL
No response
Expected Behavior
Horizontal rule should be added when setHorizontalRule() command is executed, even when on the end of the document, without throwing an error.
Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: