anchoredPopover.close() can clobber a newer popover sharing the same dom refKey
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 74/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 冷清
- 技術堆疊
- typescript
- 領域
- frontend
研究方向
從 src/ui/popover.ts 中的 createAnchoredPopovers 開始,並將關閉路徑與 tests/unit/popover.test.ts 中的 I-21/stale-clobber 回歸進行比較。先執行該測試,然後更新行為,使保留的 close handle 無法移除佔用相同 refKey 的較新 popover。完成的標準是較新的 popover 仍然存在,同時原始 popover 仍可安全關閉。
由索引模型根據 Issue 內容生成。
描述
anchoredPopover's close() (now in src/ui/popover.ts, createAnchoredPopovers) removes whatever node currently occupies app.dom[refKey] without verifying that node is the one it opened:
close() {
if (getRef(refKey)) { ... /* removes it unconditionally */ }
}
Repro: open popover A on refKey, open popover B on the same refKey (A's slot is now B), then invoke A's retained close() handle — B gets removed/clobbered even though A never touched it, and the keyboard owner it releases may no longer belong to A either (keyboard release itself is idempotent via the released flag in acquireKeyboardOwner; the DOM removal is not).
This predates the #588 phase-4 composition-root refactor (the code moved verbatim from src/ui/app.ts, byte-identical) — surfaced during that refactor's readiness review, not introduced by it. Deliberately not fixed there, per this repo's "surface out-of-scope findings, don't bury them" discipline: fixing it would have been a behavior change inside a PR whose scope and review budget were both set for a pure structural extraction.
A regression test pinning the current (buggy) behavior lives in tests/unit/popover.test.ts (search for "I-21" / "stale-clobber").
Suggested fix direction: give each open() call a token/generation and have close() no-op if the ref slot's current occupant token doesn't match the token the closer was handed.
- 主要語言
- TypeScript
- 星號
- 9
- 分支
- 2
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Altinity/altinity-sql-browser 的其他 Issue
-
inbox
難度 2/5 1-3 小時 新手友好度 76/100
Altinity/altinity-sql-browser#605 ·
-
inbox
難度 2/5 1-3 小時 新手友好度 78/100
Altinity/altinity-sql-browser#509 ·
-
inbox
難度 2/5 1-3 小時 新手友好度 78/100
Altinity/altinity-sql-browser#489 ·
-
flamegraph未關閉enhancement
難度 5/5 一週以上 新手友好度 25/100
Altinity/altinity-sql-browser#684 ·
-
bug
難度 4/5 3-5 天 新手友好度 68/100
Altinity/altinity-sql-browser#680 · 2 則留言 ·
查看 Altinity/altinity-sql-browser 的全部 Issue
相似的 Issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難度 1/5 1 小時以內 新手友好度 90/100
lingdojo/kana-dojo#32663 · 1 則留言 · 5 個 reaction ·
維護者通常 1 天內回覆
-
Admin: Title Separator field can't be cleared (input falls back to "|")可能已有人在做 @emdashbot 今天認領。 未關閉bot:bug bot:in-review
難度 2/5 1-3 小時 新手友好度 80/100
emdash-cms/emdash#4236 · 3 則留言 ·
維護者通常 1 天內回覆
-
PHP workflow streaming requests buffer the full SSE response可能已有人在做 @Winoren 今天認領。 未關閉review: medium
難度 2/5 1-3 小時 新手友好度 84/100
langgenius/dify#44270 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
area:holodeck review-finding
難度 2/5 1-3 小時 新手友好度 62/100
hyperdrive-technology/holodeck#142 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 90/100
code-yeongyu/senpi#3573 ·
維護者通常 1 天內回覆