state/editing? outlives the editor's textarea
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 領域
- backend
調査の方向性
Read the :editor/editing? state and state/get-input callers, then trace the editor component lifecycle and the shortcut and CodeMirror paths described in the issue. Compare the two proposed meanings of editing? and identify which callers need each; done means maintainers have chosen a consistent state contract that prevents stale textarea access.
索引モデルが issue の本文から書いたものです。
説明
state/editing? outlives the editor's textarea
state/editing? (:editor/editing?) can stay true for a moment after the block editor's textarea has left the DOM: the block was just deleted, the editor closed, a re-render replaced it. In that window state/get-input returns nil while everything that asks editing? still treats the user as editing. Code that trusts editing? and then reads the textarea throws.
A local key fuzzer that records uncaught page errors found this through several entry points:
- block-editing shortcuts (Alt+E, Alt+A, Alt+U, Alt+K, the word movement and word delete shortcuts): fixed for the whole shortcut group in #13865 by requiring a live input in the group's gate;
- Up/Down at the edge of a code block (CodeMirror's own key handler, outside the shortcut gate):
get-prev-block-non-collapsedgot a nil block (also in #13865); - earlier, cursor helpers and paste handlers reached through other paths.
#13865 removes the crashes but leaves the state as it is: any new code that checks editing? and reads the textarea can hit the same thing.
The design question
Should editing? mean "a block editor textarea is mounted"? Options:
- clear
:editor/editing?when the editor component that set it unmounts without another taking over (care is needed for re-renders that unmount and remount the same editor); - or define
editing?as(some? (get-input))for callers that act on the textarea, and keep the current flag for callers that only need "a block is being edited".
This touches editing state everywhere, so it is a question for the maintainers rather than a patch.
- 主要言語
- 言語のデータがありません
- スター
- 29
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
logseq/db-test のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolved対応中かも @RaphaelFakhri が 20 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
`#Asset` label is not displayed on asset nodes when `Hide from Node` is disabled対応中かも @tiensonqin が 23 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
似ている issue
-
enhancement triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ShaftHQ/SHAFT_ENGINE#7901 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ClickHouse/clickhouse-js#1130 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
DOI-USGS/pywatershed#428 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
hugohe3/ppt-master#348 ·
メンテナーはふだん 1 日以内に返信
-
bug claude Minor static-analysis
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
linagora/cozy-flagship-app#1358 ·