Undoing a block move into a multi-column layout removes the block until a second undo
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
Hướng nghiên cứu
Start in src/extensions/DropCursor/multiColumnHandleDropPlugin.ts, where the drop handler removes the dragged block and then rewrites the column structure in separate editor calls. Check how editor.transact() groups steps for undo, and look for an existing test covering multi-column drops to extend. Done when one undo after a drop restores the original document with the block visible.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What’s broken?
When I drag a block to the left or right of another block to create a multi-column layout, undoing the move once makes the moved block disappear from the document. Undoing a second time restores the block to its original position.
What did you expect to happen?
A single undo should revert the entire drag-and-drop operation and restore the document to its original state, with the moved block visible in its original position.
Steps to reproduce
- Create a document with at least two blocks.
- Use a block's drag handle to move it to the left or right of another block, creating a multi-column layout.
- Trigger Undo once (for example, by clicking the editor's Undo button or calling
editor.undo()). - Observe that the moved block disappears.
- Trigger Undo again and observe that the block returns to its original position.
BlockNote version
0.55.0 (@blocknote/[email protected])
Environment
Chrome on macOS; exact browser version not recorded.
Additional context
In src/extensions/DropCursor/multiColumnHandleDropPlugin.ts, the drop handler removes the dragged block and then updates or replaces the column structure using separate editor operations. This appears to split a single drag-and-drop action into multiple undo-history steps. In a local patch, wrapping the removal and column update/replacement in editor.transact() made one undo restore the original document.
Contribution
- I'd be interested in contributing a fix for this issue
Sponsor
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖
- Ngôn ngữ chính
- TypeScript
- Star
- 10.3k
- Fork
- 777
- Merge trung bình
- 3 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 44
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TypeCellOS/BlockNote
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TypeCellOS/BlockNote#2949 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
a11y
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
TypeCellOS/BlockNote#2855 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
a11y
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
TypeCellOS/BlockNote#2829 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Comment thread actions: hover-only controls and unlabeled buttons in ThreadsSidebaCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởa11y
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
TypeCellOS/BlockNote#2824 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tryParseMarkdownToBlocks throws on a numbered or check list item that starts with <details>Có thể đã có người làm @jkugsiya đã nhận 2 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
TypeCellOS/BlockNote#3189 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TypeCellOS/BlockNote
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
callstackincubator/simlock#639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
aws/agentcore-cli#2606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug Cosmetic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug claude Minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
linagora/twake-mail-admin#301 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày