Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Code Editor becomes unresponsive when 'value' prop is not empty

Đang mở
#711 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
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với bản tái hiện được liên kết trong issue và kiểm tra stack trace về việc chọn của CodeMirror đã được báo cáo. Tái hiện các bước điều hướng caret và chỉnh sửa dòng với một value prop không rỗng; được xem là hoàn tất khi trình soạn thảo vẫn phản hồi và không xảy ra IndexSizeError.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

If 'value' prop is defined for the codemirror then following bugs occur:

  • sometimes we cannot use caret navigation for first word of code editor
  • if we delete the entire line then add just single word then editor becomes unresponsive... after that it either removes the word after like 1 min or throws the following error:

IndexSizeError
Failed to execute 'collapse' on 'Selection': The offset 4 is larger than the node's length (0).
▼ 6 stack frames were expanded.
at eval (https://slvju.csb.app/node_modules/
codemirror/view/dist/index.js:2520:18
at DOMObserver.ignore (https://slvju.csb.app/node_modules/
codemirror/view/dist/index.js:5690:14
at DocView.updateSelection (https://slvju.csb.app/node_modules/
codemirror/view/dist/index.js:2504:26
at EditorView.update (https://slvju.csb.app/node_modules/
codemirror/view/dist/index.js:6008:20
at DOMObserver.flush (https://slvju.csb.app/node_modules/
codemirror/view/dist/index.js:5797:50
at MutationObserver.eval (https://slvju.csb.app/node_modules/
codemirror/view/dist/index.js:5561:263

https://github.com/user-attachments/assets/82ebf7a9-32f0-4afc-a175-ceb71f4496e2

Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
162
Merge trung bình
2 giờ 41 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 uiwjs/react-codemirror

Tất cả issue của uiwjs/react-codemirror

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.