Skip to content

fix(fields): the people picker's list scrolls by wheel and touch inside a dialog - #36929

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36852-peoplepicker-dialog-scroll
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36852-peoplepicker-dialog-scroll

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread
Fixes #36852

repo:objectstack#3 · os-support-ai · session_01WGufziG2t1d9cfRQJDrHkB

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:在弹窗表单里点人员字段,弹出的人员列表现在能用滚轮和手指滚动,排在下面的人也能选到;人员选择器在电脑上的居中对话框里同样能滚动了,手机上的底部面板不变。
  • 为什么做:查找选择器的同类问题修好后,复核发现人员选择器在弹窗里也滚不动,候选人一多就选不到后面的人。
  • 出错会怎样:最坏是下拉打开时点页面别处要先点一下关掉下拉,或屏幕阅读器暂时读不到下拉后面的页面,与查找选择器已接受的表现相同;可整体撤回这一个提交。
  • 要你做什么:无

What changes

Confirmed cause, reproduced on main before any change (Chromium, 1280x800 with touch enabled, the inline PeoplePicker in a Radix Dialog, 60 users, 25 loaded; readings below). It has two parts, and the second is one the card did not name:

  1. The dialog's scroll lock cancelled every move over the popover. Radix Dialog mounts react-remove-scroll with the dialog content as its only shard; the inline popover portals to the body, outside it, so every wheel and touchmove over the popover is preventDefaulted (5 of 5 wheel, 9 of 9 touchmove). Outside a dialog none is.
  2. The list had nothing to scroll, dialog or not. The popover is capped by max-h-[min(28rem,60vh)] only, so it has no definite height; the list area (ScrollArea, min-h-0 flex-1) is clipped to the room left, but its Radix viewport is h-full, which against an indefinite height falls back to its content height. Measured: viewport 1248px tall, scrollHeight - clientHeight = 0, so the rows past the popover's edge were clipped, not scrollable, even outside a dialog. With only modal added the list still does not move.

The fix, in ui/packages/fields/src/widgets/PeoplePicker.tsx only:

The list area is shared by the picker's three containers. The phone's bottom sheet (h-[85vh], a definite height) measures the same before and after. The centred desktop dialog (max-h-[80vh]) had the same clipped, unscrollable list and now scrolls.

What modal brings with it, already accepted for the lookup popover: while the popover is open the page behind it is aria-hidden, focus stays in the popover (Escape closes it), and the first click outside closes the popover before it reaches what it landed on.

Tests

New top-level describe in PeoplePicker.test.tsx (the component's shared harness file), with the picker inline inside a Radix Dialog:

  • open popover: the dialog sits under an aria-hidden ancestor and the popover does not (the observable half of modal);
  • the list area carries flex flex-col min-h-0 flex-1 (jsdom does no layout, so this holds the structure; the geometry is the browser readings below);
  • CONTROL, popover closed: the dialog is not hidden, so the hidden reading comes from the open popover and not from the dialog.

Ablations, one for each new pin, run through scripts/ablation-replace.mjs (the anchor hit, the blob moved, and it was restored to HEAD with git diff HEAD empty), on -t "inside a dialog":

  • dropping modal: the modal pin fails, the other two pass (1 failed, 2 passed);
  • dropping flex ... flex-col: the list-area pin fails, the other two pass (1 failed, 2 passed).
Local runs (head ac7171c)
  • PeoplePicker's five test files: Test Files 5 passed (5), Tests 47 passed (47).
  • @object-ui/fields suite (pnpm --dir ui exec vitest run packages/fields/): Test Files 328 passed, 1 skipped (329), Tests 4998 passed, 7 skipped (5005).
  • pnpm --filter @object-ui/fields type-check: exit 0. tsconfig.test.json lists PeoplePicker.test.tsx (--listFiles, 1 hit).
  • dispatch-gates --commands: 37 of 38 run locally, all exit 0. Not measured: pnpm --dir ui exec vitest run scripts/, killed by SIGKILL on the shared box after 5 minutes. It reads none of this diff's files; CI runs it.

Acceptance notes

  • The centred desktop dialog's list was also clipped and could not be scrolled, a reachable defect on main that the card did not name. It is fixed by the same one-line class change, because the three containers share the list area. No separate card.

Verification

Read first: the ScrollArea class in PeoplePicker.tsx (what makes the list scroll at all), then the modal Popover (the behaviour change).

Two minutes: open any create dialog that has a user field, with more users than fit, open the field's dropdown, and scroll it with the wheel: the list moves and the last users can be picked.

Browser readings (harness: Radix Dialog + inline PeoplePicker from source, Tailwind from the components sheet, 1280x800, touch on)
case in dialog viewport px max scroll wheel 5x120 touch drag wheel / touch prevented
main yes 1248 0 0 to 0 0 to 0 5/5 · 9/9
main no 1248 0 0 to 0 0 to 0 0/5 · 0/9
main + list flex column only yes 370 878 0 to 0 0 to 0 5/5 · 9/9
main + list flex column only no 370 878 0 to 600 0 to 129 0/5 · 0/8
modal only yes 1248 0 0 to 0 0 to 0 5/5 · 9/9
this PR yes 370 878 0 to 600 0 to 129 0/5 · 0/8
this PR no 370 878 0 to 600 0 to 130 0/5 · 0/8
sheet, 375 wide, main yes 539 709 0 to 600 0 to 129 0/5 · 0/9
sheet, 375 wide, this PR (CONTROL) yes 539 709 0 to 600 0 to 127 0/5 · 0/6
desktop dialog picker, main yes 1248 0 0 to 0 0 to 0 n/a
desktop dialog picker, this PR yes 516 732 0 to 600 0 to 127 0/5 · 0/8

The wheel is capped at 600 by the five 120px ticks, not by the list. The prevented counts are read by a window listener after the document-level lock listener has run.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB

…scrolls inside a dialog

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB
…st scrolls in a max-height container

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — ACCEPT · repo:objectstack#3 · head ac7171c · 2026-11-24T09:55Z

L1-a read of #36929 (card #36852) at ac7171c32437d7cf30b061e2b7faac6f4402c49d. Clause-②: no, no governed path, so no contract review is owed.

Mechanical. l1-face CLEAN (13 items; 44 success · 13 expected skips · 0 failed · 0 pending). check-governed-merges: NOT governed, 83 lines, one PR on the card. mergeable_state clean.

Read.

  • <Popover modal …> on the inline arm makes the popover its own react-remove-scroll layer, the same treatment fix(fields): lookup quick-create stays whole and clickable in a short popover; its list scrolls in dialogs #36844 gave the lookup popover. The sheet arm is unchanged, as the card asks.
  • The second cause is real and is fixed at the shared list area. The ScrollArea root becomes flex min-h-0 flex-1 flex-col, so Radix's viewport is a flex item. Because the viewport is a scroll container, its automatic minimum height resolves to 0 and it shrinks to the room a max-h-* container gives it. Before, it took its content height and clipped. The phone sheet has a definite height and measures the same before and after. The PR names the centred desktop dialog's clipped list, which the same line fixes.
  • Pins: the modal half is read through its observable effect (the host dialog is aria-hidden while the popover is open, the popover is not), the flex column is read on the list area, and a closed-popover CONTROL is included. The wheel and touch geometry is in the PR body's browser table. Main: 0 max scroll, every move prevented. This PR: the list scrolls by wheel and by touch, 0 moves prevented. That reading covers the inline popover and the desktop dialog.
  • The changeset sentences hold against the tree, including the behaviour change a modal popover brings: the page behind is hidden from assistive technology, and an outside click closes it first. @object-ui/fields is the one package touched.

Nits (no action required):

  • N1. jsdom pins the structure, not the scroll. The browser table is the evidence for the geometry, and that is the right split for this change.

ACCEPT.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufziG2t1d9cfRQJDrHkB

Landing: 2026-11-24T09:57Z · area ux-C · p2 · head ac7171c32437d7cf30b061e2b7faac6f4402c49d

Probe Reading
L1 席位核对 ACCEPT at this head, comment 7128095282 (l1-face CLEAN; no must-fix, no should-fix; nit N1 needs no action)
L2 not owed: Clause-②: no, Metadata-protocol: none, no packages/spec/src/**, no governed path
Checks 44 success, 13 skipped, 0 failed on this head
mergeable_state clean
check-governed-merges NOT governed, 83 changed lines ≤ 3000
landing-k CAN'T ANSWER (UI-only, Test Core skipped); K read via merge-base: git rev-list --count --first-parent d95d34f8..origin/main = 8 (< 15), no translations/ file in the PR

State: ready + auto-merge (merge queue).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 24, 2026 09:57
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 62692b7 Nov 24, 2026
58 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36852-peoplepicker-dialog-scroll branch November 24, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

弹窗里的人员选择器:内嵌下拉列表滚不动(与 #36825 查找选择器同一类滚动锁缺口)

2 participants