ArrowRight at the end of a block with open comments throws "Illegal invocation"
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 86/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- clojure, playwright
- Área
- frontend, testing-qa
Línea de trabajo
Comienza en src/main/frontend/handler/editor.cljs, en node-contains?, y rastrea sus llamadores, incluidos block-node-outside-comments-area y move-to-block-when-cross-boundary. Reproduce los pasos de navegación de bloques y comentarios indicados en la aplicación web o con Playwright. Está terminado cuando ArrowRight en el límite se mueve al siguiente bloque o área de comentarios sin Illegal invocation.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Steps
On a DB graph, on a page with a block "Loose thought" followed by at least 1 more block, on the web app:
- Click the text of "Loose thought".
- Press Ctrl+Space (Add comment). A "Comments 0" area with a "Reply..." box opens under the block.
- Press Escape twice.
- Click the text of "Loose thought" again.
- Press End, then ArrowRight.
Expected
The cursor moves to the next block, or to the comments area.
Actual
TypeError: Illegal invocation in frontend.handler.editor/node-contains?, called from block-node-outside-comments-area, navigable-sibling-block and move-to-block-when-cross-boundary, reported to the window as uncaught.
The steps reproduced it 3 of 3 times (Playwright, trusted input, a new graph each time).
Cause (read in code)
node-contains? in src/main/frontend/handler/editor.cljs is
(or (and (gobj/get parent "nodeType")
(gdom/contains parent child))
(when-let [contains-fn (gobj/get parent "contains")]
(contains-fn child)))
For a DOM node that does not contain child, the first branch is false and the or goes on to the second, which calls Node.prototype.contains without its receiver. A DOM method called on no object throws "Illegal invocation". So the function throws exactly when the answer is false. block-node-outside-comments-area steps from the comments area to the next block in document order and asks node-contains? whether the comments area holds it, so it throws on the first block past the comments area, which is the block it is looking for. The branch is reached from Left and Right at a block boundary (move-to-block-when-cross-boundary) when the neighbouring block is a comments area; Up and Down take the up-down? branch of navigable-sibling-block and do not call it. The code came with 0e87a830a (feat: comments).
Found by a monkey test (gremlins.js with trusted Playwright input): 4 of 401 runs. In seed 1049 the run had dragged a block onto a comments area before 2 ArrowRight presses; the steps above were written from the stack and the code, and reproduce it without the drag.
The steps above fail 3 of 3 times on the web build of master 16c4ed1a0.
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 28
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de logseq/db-test
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Potential Dataloss: Deleting an entry from the property page's node table has no confirmation dialogAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Todos los issues de logseq/db-test
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
openlibhums/janeway#5604 ·
Los mantenedores suelen responder en 1 día
-
fix(ui): say the connector edit sheet drops the stored secret when the endpoint moves originAbiertobug observability station:mac ui-dashboard
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Unable to select the sectionAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Simple presets ignore a feedback's affectedProperties and add a deprecated imageBuffers layerAbiertoBUG
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
PostHog/posthog.com#20628 ·
Los mantenedores suelen responder en 1 día