ArrowRight at the end of a block with open comments throws "Illegal invocation"
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- clojure, playwright
- Ambito
- frontend, testing-qa
Direzione di ricerca
Inizia in src/main/frontend/handler/editor.cljs da node-contains? e traccia i relativi chiamanti, inclusi block-node-outside-comments-area e move-to-block-when-cross-boundary. Riproduci nell’app web o con Playwright i passaggi di navigazione tra blocchi e area dei commenti elencati. Il lavoro è completato quando ArrowRight al confine passa al blocco o all’area dei commenti successivi senza Illegal invocation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- 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 87/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Pressing Delete after double-clicking a journal page's title row throws in keydown-delete-handlerAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Tutte le issue di logseq/db-test
Issue simili
-
feature task
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
RealDevSquad/website-www#1178 ·
-
priority: P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PedestrianDynamics/pyFDS-Evac#338 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility bug revealjs
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
quarto-dev/quarto-cli#14961 ·
I maintainer di solito rispondono entro 1 giorno
-
[Simple] NavigationBar primary commands do not render AppBarButton.Content when it is a UIElementApertacontrol/navigationbar kind/bug triage/untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
unoplatform/uno.toolkit.ui#1652 ·
I maintainer di solito rispondono entro 1 giorno