Pressing Delete after double-clicking a journal page's title row throws in keydown-delete-handler
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:
- Go to Journals. The list shows today and "Jan 1st, 2020".
- Click the bullet of the empty block under "Jan 1st, 2020".
- Click the "Jan 1st, 2020" title. The journal page opens.
- Double-click the empty space in the page's title row, between the title and the "#Journal" tag.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di logseq/db-test
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Tutte le issue di logseq/db-test
Issue simili
-
needs:triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
txn2/mcp-data-platform#1984 ·
I maintainer di solito rispondono entro 1 giorno
-
ai-discovered
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
agent-canvas bug llm priority:low ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
OpenHands/OpenHands#17806 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
todo
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
RocketChat/Rocket.Chat#42442 ·
I maintainer di solito rispondono entro 1 giorno