Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#1,358 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
frontend

Direzione di ricerca

Inizia in src/main/frontend/handler/editor.cljs, seguendo editor-delete fino a keydown-delete-handler e ai controlli state/editing? e state/get-input. Riproduci i passaggi elencati nella pagina del journal, quindi verifica che Delete non raggiunga più un input null e non produca alcun TypeError non gestito quando l’elemento dell’editor è assente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Nessun dato sulla lingua
Stelle
28
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di logseq/db-test

Tutte le issue di logseq/db-test

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.