[QTI] Unmounting TipTap leaves its modal click listener attached

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

Maintainer thường phản hồi trong vòng 1 ngày

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
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, react
Lĩnh vực
frontend, testing

Hướng nghiên cứu

Start by tracing the TipTap formula and image dialog positioning and cleanup paths mentioned in the issue, then inspect the tests that mount the editor in Jest/jsdom. Reproduce the capturing mousedown registration and compare it with removals when unmounting before and after attachment. Done means neither dialog leaves a document listener after unmount; the issue states it is not open for contribution.

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

Mô tả

bug

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Target branch: unstable

Observed behavior

Unmounting an editor with its formula dialog open leaves a capturing mousedown listener on document. The image dialog uses the same positioning and cleanup code.

Expected behavior

Unmounting removes the editor's modal listeners and cancels pending registrations.

User-facing consequences

Repeated editor mounts and removals accumulate obsolete listeners that run on later clicks.

Steps to reproduce

  1. Spy on document.addEventListener and document.removeEventListener.
  2. Mount TipTap, open an editor-made formula, and wait for the capturing mousedown registration.
  3. Unmount without dismissing the dialog and compare the registrations with the removals.

Acceptance Criteria

  • Unmounting before or after attachment leaves no document listener from the formula or image dialog.

Context

Reproduced in Jest/jsdom on unstable at 2713cbf33.

AI usage

Codex drafted the issue from the #6309 review. It checked the actual document registrations in a mounted TipTap editor and read the image-dialog cleanup path.

Ngôn ngữ chính
JavaScript
Star
214
Fork
327
Merge trung bình
17 giờ 5 phút
Pull request đã merge (30 ngày)
25

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

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 learningequality/studio

Tất cả issue của learningequality/studio

Issue tương tự

Thêm issue về JavaScript

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.