Sidebar thread rows dialog closes after dragging a layout item and clicking inside the dialog
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
apps/web/src/components/settings/SidebarRowLayoutRow.tsxから始めて、SidebarRowLayoutEditorのDragOverlayとPointerSensorのアクティベーション制約を調べてください。issueにあるドラッグとクリックの手順を再現し、修正によってダイアログが開いたままになり、チップのテキストが選択されないことを確認してください。関連するポップオーバーについて、apps/web/src/components/chat/ThreadDetailsBlocks.tsxの同じオーバーレイパターンを確認してください。
索引モデルが issue の本文から書いたものです。
説明
What happened
In Settings → Appearance → Sidebar thread rows ("Customize"), dragging a layout item (such as space) and then clicking or slightly dragging inside the dialog causes the dialog to close unexpectedly. It does not always happen in one shot.
https://github.com/user-attachments/assets/538d46fc-33c1-4e84-9249-a7222e28140b
Diagnosis
SidebarRowLayoutEditor(apps/web/src/components/settings/SidebarRowLayoutRow.tsx:394-399) portals<DragOverlay dropAnimation={null} zIndex={100}>intodocument.body(outside Base UI'sDialogPopup) withoutpointer-events-none(pointer-events: none).- When a drag exceeds
PointerSensor'sactivationConstraint: { distance: 4 }(SidebarRowLayoutRow.tsx:198),DragOverlaymounts directly under the pointer. On release,pointeruphitsDragOverlayand@dnd-kit'sonDragEndunmountsDragOverlaysynchronously beforemouseup, somouseuplands ondocument.body. Becausemousedownwas insideDialogPopupandmouseuplanded ondocument.body, the browser dispatchesclickon their nearest common ancestor (document.body). - Base UI's
useDismisscapture listener (closeOnPressOutsideCapture) sees thatclickondocument.bodyand attaches a one-shot bubbleclicklistener ontodocument.body. Immediately afterward in the capture phase,@dnd-kit'sAbstractPointerSensorcallsstopPropagation()on thatclickevent, leaving the one-shot bubble listener armed ondocument.body. - On the next non-drag click anywhere inside the dialog (after
@dnd-kit's 50 ms capture cleanup—including a< 4pxpress/micro-drag that doesn't activatePointerSensor),useDismissclearsinsideReactTreeduring the inner click; as theclickbubbles up todocument.body, the stale listener fires withtarget === document.body. Sincedocument.bodycontainspopupElement,DialogInteractions.outsidePressreturnstrueand closes the dialog withreason: "outside-press". - Additionally,
DraggableChip(SidebarRowLayoutRow.tsx:474-489) omitsselect-none, so moving<= 4pxbeforePointerSensoractivates selects chip text (e.g."pace"in"space"). - Note:
ThreadDetailsBlocks(apps/web/src/components/chat/ThreadDetailsBlocks.tsx:205-220) uses the same<DragOverlay dropAnimation={null} zIndex={100}>portal todocument.bodywithoutpointer-events-noneinsideThreadDetailsCard's Base UIPopover.
Steps to reproduce
- Open Settings → Appearance → Sidebar thread rows → Customize.
- Press and drag any layout chip (for example
space) more than 4 px, then release. (The dialog stays open.) - Wait > 50 ms, then click anywhere inside the dialog—or press on
spaceand move< 4pxbefore releasing. - Expected: The dialog stays open and chip text is not selected.
- Actual: The dialog closes immediately.
Version
0.1.14-nightly.20261129.5438 (commit 7cb8305e3a; also present on main at d17aa43c82)
Environment
T3 Code Desktop 0.1.14-nightly.20261129.5438, Linux x64 (7.3.5-200.fc44.x86_64), Node v24.22.1, Chromium 152 / Electron 44.10.1
Evidence
Reproduced in Playwright Chromium against `@base-ui/react` 1.9.0 + `@dnd-kit/core` 6.3.1:
=== A. Drag 20px right once -> open=true ===
{"type":"dnd:start","id":"top-spacer-0"}
{"type":"doc:pointerup","t":584,"target":"SPAN.","selection":""}
{"type":"dnd:end"}
{"type":"doc:mouseup","t":609,"target":"BODY.","selection":""}
{"type":"doc:click","t":610,"target":"BODY.","selection":""}
=== B. Click once after Drag A -> open=false ===
{"type":"doc:pointerup","t":677,"target":"SPAN.","selection":""}
{"type":"doc:mouseup","t":685,"target":"SPAN.","selection":""}
{"type":"doc:click","t":686,"target":"SPAN.","selection":""}
{"type":"dialog:openChange","t":689,"open":false,"reason":"outside-press","eventType":"click","targetTag":"BODY"}
Adding `pointer-events: none` to `<DragOverlay>` prevented `mouseup`/`click` from falling onto `document.body` and kept `open=true` across all drag and click sequences.
Related issues
Introduced in #42576. Similar in mechanism to #45028 (a press/release across element boundaries resolves click to an ancestor outside the popup), though here the cause is an unmounted portaled DragOverlay without pointer-events: none interacting with Base UI useDismiss.
Fix applied or workaround
None applied locally. Workaround: move layout items using the arrow keys while a chip is focused, or avoid clicking inside the dialog after a pointer drag.
Filed by
antigravity (gemini-4-hydrogen) via t3 triage
- 主要言語
- TypeScript
- スター
- 24.8k
- フォーク
- 6.4k
- 平均マージ
- 59分
- マージ済み PR(30日)
- 613
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
agentic-workflows
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
opencollective/opencollective-frontend#12789 ·
メンテナーはふだん 1 日以内に返信
-
Web download page shows a file as Completed when its download from S3 fails with an error responseオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
awslabs/visual-asset-management-system#2097 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
openwatersio/slackwater#591 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
compiler-explorer/compiler-explorer#9738 ·
メンテナーはふだん 2 日以内に返信