[QTI] Unmounting TipTap leaves its modal click listener attached

Aberta
#6,473 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
javascript, react
Domínio
frontend, testing

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
JavaScript
Estrelas
214
Forks
327
Merge médio
17h 5min
PRs com merge (30d)
25

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de learningequality/studio

Todas as issues de learningequality/studio

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.