[QTI] Unmounting TipTap leaves its modal click listener attached

Offen
#6,473 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
javascript, react
Bereich
frontend, testing

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
JavaScript
Sterne
214
Forks
327
Ø Merge
17 Std. 5 Min.
Gemergte PRs (30 T.)
25

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus learningequality/studio

Alle Issues in learningequality/studio

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.