ueberdosis/tiptap

[Bug]: Cut to start causes RangeException

Open

#6,450 opened on Jun 15, 2025

View on GitHub
 (2 comments) (0 reactions) (0 assignees)TypeScript (1,979 forks)batch import
area: corecomplexity: easygood first issueimpact: medium

Repository metrics

Stars
 (23,454 stars)
PR merge metrics
 (Avg merge 4d 13h) (46 merged PRs in 30d)

Description

Affected Packages

core

Version(s)

2.11.5

Bug Description

Calling commands.cut with targetPosition 0 will cause a range exception

Browser Used

Firefox

Code Example URL

No response

Expected Behavior

Cut content should be moved to start of the document

Additional Context (Optional)

Can be fixed by using Math.max(0, newPos - 1) in the command definition

Dependency Updates

  • Yes, I've updated all my dependencies.

Contributor guide