ArrowRight at the end of a block with open comments throws "Illegal invocation"
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- clojure, playwright
- 領域
- frontend, testing-qa
調査の方向性
src/main/frontend/handler/editor.cljs の node-contains? から始め、block-node-outside-comments-area と move-to-block-when-cross-boundary を含む呼び出し元を追跡します。Web アプリまたは Playwright を使って、記載されたブロックとコメント領域のナビゲーション手順を再現します。境界上で ArrowRight を押すと、Illegal invocation を発生させずに次のブロックまたはコメント領域へ移動すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- 言語のデータがありません
- スター
- 28
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
logseq/db-test のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Pressing Delete after double-clicking a journal page's title row throws in keydown-delete-handlerオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
似ている issue
-
Font overview "Group by" labels can show raw localization keys (translated at module load time)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OHDSI/Data2Evidence#3450 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100