ueberdosis/tiptap

[Bug]: Cut to start causes RangeException

Open

#6450 aperta il 15 giu 2025

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)TypeScript (1979 fork)batch import
area: corecomplexity: easygood first issueimpact: medium

Metriche repository

Star
 (23.454 star)
Metriche merge PR
 (Merge medio 4g 13h) (46 PR mergiate in 30 g)

Descrizione

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.

Guida contributor