Component-selection dropdown/popover doesn't lock background scroll while open

未关闭
#1,634 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

Start by locating the component-selection dropdown/listbox used for inserting blocks in Keystatic and the related @keystar/ui popover behavior; the issue also mentions UserInterface in @keystatic/core 0.6.9 config.d.ts as a configuration boundary. Reproduce the behavior with the page scrolled, then verify that wheel input scrolls the open dropdown when needed or leaves the background stationary.

由索引模型根据 Issue 内容生成。

描述

Installed: @keystatic/[email protected], @keystar/[email protected].

Repro steps

  1. Open an entry with a content/blocks field that supports inserting components (an "insert component" or "add block" control that opens a dropdown/listbox of component types).
  2. Scroll the underlying page/form so the insertion point is no longer at the very top, then open that dropdown.
  3. Scroll the mouse wheel or trackpad while the dropdown is open.

Expected: scrolling while the dropdown is open either scrolls the dropdown's own content (if it's long) or does nothing to the background; the underlying page does not scroll behind the open dropdown.

Actual: the underlying page scrolls behind the open dropdown instead of the dropdown owning the scroll, so the dropdown does not lock background scroll while open. Observed during a live editing session while inserting a component into a content field.

Note: this was observed in a live editing session, not reproduced in a separate local setup.

Why this looks like a genuine gap rather than app misconfiguration: the dropdown/listbox is Keystatic's own @keystar/ui component, not something the consuming app supplies. The only UI customization surface in Keystatic's config (UserInterface in @keystatic/core 0.6.9 config.d.ts) is brand and navigation; there is no CSS/theme hook and no way to reach the popover internals from config. Scroll-lock is JS behavior, not stylesheet-overridable, so a consuming app can't add it without depending on uncontracted internal DOM.

Context: multi-locale marketing site; editors regularly insert components (e.g. embeds) into long-form content and lose their place when the page scrolls unexpectedly behind the open menu.

Related but distinct: #1376 (closed) reported the component menu failing to open when the page is scrolled down. Here the menu opens fine but doesn't lock/own scroll while open.

主要语言
TypeScript
星标
2.5k
派生
181
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Thinkmill/keystatic 的其他 Issue

查看 Thinkmill/keystatic 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。