ueberdosis/tiptap

[Bug]: Cut to start causes RangeException

Open

#6,450 建立於 2025年6月15日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)TypeScript (1,979 fork)batch import
area: corecomplexity: easygood first issueimpact: medium

倉庫指標

Star
 (23,454 star)
PR 合併指標
 (平均合併 4天 13小時) (30 天內合併 46 個 PR)

描述

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.

貢獻者指南