Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Pressing Delete after double-clicking a journal page's title row throws in keydown-delete-handler

Cerrado Apto para principiantes
#1,358 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Área
frontend

Línea de trabajo

Comienza en src/main/frontend/handler/editor.cljs, siguiendo editor-delete hasta keydown-delete-handler y las comprobaciones state/editing? y state/get-input. Reproduce los pasos indicados de la página de diario y, después, verifica que Delete ya no llegue a un input null ni produzca un TypeError no capturado cuando el elemento del editor está ausente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Steps

On a DB graph that has an empty journal page for another day (here "Jan 1st, 2020"), on the web app:

  1. Go to Journals. The list shows today and "Jan 1st, 2020".
  2. Click the bullet of the empty block under "Jan 1st, 2020".
  3. Click the "Jan 1st, 2020" title. The journal page opens.
  4. Double-click the empty space in the page's title row, between the title and the "#Journal" tag.
  5. Press Delete.

Expected

Delete does nothing (no editor is open), or deletes a character in the open editor.

Actual

TypeError: Cannot read properties of null (reading 'value') in frontend.handler.editor/keydown-delete-handler, reported to the window as uncaught.

The steps reproduced it 5 of 5 times (Playwright, trusted input, a new graph each time). Without step 2 they did not (0 of 3).

Cause (read in code)

The Delete shortcut runs editor-delete (src/main/frontend/handler/editor.cljs), which checks only (state/editing?) and calls keydown-delete-handler. That reads (state/get-input), the element whose id is the edit input id, and when the editing block is set but its textarea is not in the page the element is nil. cursor/pos and gobj/get accept nil, the selection start and end are then both nil and equal, so the handler reaches its last branch and reads (.-value input) of nil. In the recorded run the editor state stayed set while the page changed under it (the trace recorded an open editor after step 3 and none after step 4).

Found by a monkey test (gremlins.js with trusted Playwright input) of the web build of master 16c4ed1a0: 5 of 28 runs, in seed 111 from a trusted Delete key at action 48. ddmin reduced that run to 10 actions, which the steps above are read from.

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de logseq/db-test

Todos los issues de logseq/db-test

Issues similares

Más issues de Web Dev

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.