You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* The unclipped hover state drops the ellipsis ... Guarded because a touch tap latches :hover on the row after the title has already returned ... */@media(hover: hover){.sessionRow:hover.title{text-overflow: clip;}}
English summary. On iPad/touch, a single tap on a sidebar session row does not switch sessions: the first tap only latches the row's :hover state (row fill + the hidden ⋯ actions appear), so WebKit withholds the click; the second tap then switches. If the two taps land within the double-click threshold, the synthesized dblclick also fires the title's rename handler, so a "fast double tap" opens the rename dialog instead. Root cause: the row opens on click (rows/Rows.tsx:598) while rename is bound to a raw dblclick with no pointer-type gating (rows/Rows.tsx:639), and several :hover rules that change rendered content (.sessionRow:hover .rowActions etc., rows/Rows.module.css:265-288) are outside @media (hover: hover). Reproduced on dsh-v0.1.7-rc.2 (477b4f42055) and dsh-v0.1.7-rc.1 (46a7f68b092); the affected code is identical in both.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
在 iPad(触屏)上用 Web GUI 时,单击侧栏会话行不会切换会话:第一次点击只把行渲染成 hover 态(行底色 + 右侧 ⋯ 按钮出现),要第二次点击才真正切换。而如果两次点击够快(落在浏览器双击阈值内),第二次点击会触发标题上的
dblclick,于是「切换」和「重命名对话框」同时发生 —— 快点点两次 = 弹重命名,慢点两次 = 正常切换。已确认
dsh-v0.1.7-rc.2(477b4f42055)的源码与 rc.1 完全一致,最新代码里同样存在,不是旧版遗留。Environment
dsh-v0.1.7-rc.2(477b4f42055),源码构建 +dsh web --port 3080;rc.1 (46a7f68b092) 上同样复现packages/client/ui-workspace(rows/Rows.tsx、rows/Rows.module.css)Reproduction
Current behavior
① 打开会话 = 单击,重命名 = 双击,二者没有指针类型区分
packages/client/ui-workspace/src/client/rows/Rows.tsx:598— 行打开是单击:onClick={() => { onOpen(node.id) }}packages/client/ui-workspace/src/client/rows/Rows.tsx:639— 重命名挂在标题的dblclick上,没有任何pointerType/matchMedia('(hover: hover) and (pointer: fine)')门控:onDoubleClick={row.blank ? undefined : (e) => { e.stopPropagation(); onRenameRequest(node.id, row.title) }}② 行的 hover 会「改变内容/布局」,触发 iOS 的“首击只当 hover”规则
packages/client/ui-workspace/src/client/rows/Rows.module.css:iOS Safari 的规则:第一次 tap 先渲染
:hover;若这个过程检测到「内容变化」,就不再派发click,要再点一次。参见:于是:第 1 次点击被 hover 吞掉(
.rowActions由display:none变inline-flex,确实是 render 变化)→ 第 2 次点击时 hover 已是既成状态、无新变化 →click正常派发 → 会话切换。两次click若落在双击阈值内,浏览器还会合成一次dblclick,于是命中标题上的重命名 handler。③ 代码里已经有旁证
同一文件
Rows.module.css:290-295的注释明确写了触屏会 latch:hover,并且只给.title那条规则加了@media (hover: hover):会改变内容的
.rowActions/.time/.pinIndicator三条仍在媒体查询之外。workspace 行同样:.projectRow:hover .chevron/.folder(L145-146)在 hover 时切换显示。Expected behavior
RenameSessionMenuItem,order 200)。Suggested fix(两条互相独立,可任选)
pointerdown的pointerType,仅在mouse时挂onDoubleClick(或window.matchMedia('(hover: hover) and (pointer: fine)').matches为真时)。@media (hover: hover);或在@media (hover: none)下让行操作常显,使首击不再因渲染变化被吞。已有相关报告(同一条主线,建议一并引用)
这条 bug 本身还没人报过(我在 8k+ 讨论里按 双击 / 重命名 / 两次点击 / 点两次 / iPad / 触屏 / two taps / double tap / touch rename 等关键词搜过),但同类问题已经成串,说明它不是孤例,而是「web 前端目前是桌面优先」这条主线上的一环:
touch-action;作者还附了社区插件@oksure/dsh-client-ui-mobile-comfortSIDEBAR_AUTO_COLLAPSE = 1024px,没有手机/平板布局@media(都是prefers-reduced-motion),零响应式断点本案的增量:第一次把「双击重命名」这个桌面手势与触屏「两次点击」范式的直接冲突定位出来(首击被
:hover吞掉 + 快速双击命中dblclick),并给出 file:line 级证据;另外两条易被忽略的事实:重命名手势在 UI 里没有任何可发现性提示(无 tooltip/文案,只有session.rename键盘快捷键),以及会话行是role="treeitem"却没有tabIndex/onKeyDown—— 行的打开与重命名都是纯指针操作。English summary. On iPad/touch, a single tap on a sidebar session row does not switch sessions: the first tap only latches the row's
:hoverstate (row fill + the hidden ⋯ actions appear), so WebKit withholds theclick; the second tap then switches. If the two taps land within the double-click threshold, the synthesizeddblclickalso fires the title's rename handler, so a "fast double tap" opens the rename dialog instead. Root cause: the row opens onclick(rows/Rows.tsx:598) while rename is bound to a rawdblclickwith no pointer-type gating (rows/Rows.tsx:639), and several:hoverrules that change rendered content (.sessionRow:hover .rowActionsetc.,rows/Rows.module.css:265-288) are outside@media (hover: hover). Reproduced ondsh-v0.1.7-rc.2(477b4f42055) anddsh-v0.1.7-rc.1(46a7f68b092); the affected code is identical in both.All reactions