Cmd+A doesn't work when a document starts with checkboxes

Đang mở
#2,973 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue nà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
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start by reproducing the issue in the BlockNote editor with a checkbox as the first block, then trace the Cmd+A and Backspace selection/deletion behavior. Add regression coverage for this document shape and verify that deleting all content leaves only the default empty block.

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 a document starts with one or more checkbox blocks, Cmd+A followed by Backspace does not correctly clear the document content.

The issue appears to be specific to documents where a checkbox is the first block. Instead of selecting and deleting the entire document content as expected, the editor gets into a state where the content cannot be fully erased using Cmd+A + Backspace.

A screen recording demonstrating the issue is available here:

https://jam.dev/c/ac0cac24-b097-406e-8e72-f9dd43948e70

What did you expect to happen?

Pressing Cmd+A and then Backspace should select and delete all content in the document, including checkbox blocks, leaving an empty document with the default empty block.

Steps to reproduce
  1. Create a new BlockNote document.
  2. Add a checkbox block as the first block in the document.
  3. Add some additional content below it, such as text or more checkbox blocks.
  4. Focus the editor.
  5. Press Cmd+A to select all document content.
  6. Press Backspace.
  7. Observe that the document content cannot be fully deleted.

The issue can be seen in this recording:

https://jam.dev/c/ac0cac24-b097-406e-8e72-f9dd43948e70

BlockNote version

No response

Environment

No response

Additional context

No response

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.2k
Fork
772
Merge trung bình
3 ngày 11 giờ
Pull request đã merge (30 ngày)
17

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TypeCellOS/BlockNote

Tất cả issue của TypeCellOS/BlockNote

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.