Commit Graph
2 Commits
Author SHA1 Message Date
AetherNo2332 425cc369fb fix(web): 基础控件 Tooltip - 子元素可触发并保留键盘可达性 (#560)
Original-Commit: 38b5909fa78902048345ad8d8e00248660830ad5
fix(web): 基础控件 Tooltip - 子元素可触发并保留键盘可达性

react-aria-components 的 TooltipTrigger 通过 context 下发 hover/focus 处理与 triggerRef,
只有消费该上下文的组件才会真正挂上;原来包一层普通 span,既不读 context 也拿不到 ref,
所以悬停/聚焦都不弹气泡(有定位也无基准)。

包装层改为 Focusable + excludeFromTabOrder:悬停与聚焦都能触发、气泡有定位基准,
外层不占 Tab 位,键盘焦点仍落在内层控件上,导航顺序不变。
2026-09-21 09:37:19 +08:00
AetherNo2332 d82a4cb3a8 fix(web): 诊断 - 在没有 window.location 的环境不再抛错 (#559)
Original-Commit: cdb07ca9cbdd74e63d8e80659f3bdbd6d49b3dff
fix(web): 诊断 - 在没有 window.location 的环境不再抛错

recordDiagnosticEvent / normalizeRoute 用 `typeof window !== "undefined"` 判断"在浏览器里",
但 bun 的测试环境里 window 存在、window.location 不存在,于是每次记录诊断事件都抛
`TypeError: undefined is not an object (evaluating 'window.location.pathname')`,
director-diagnostics-recorder 的 9 条基线用例因此全红。

改成 browserLocation():window 与 window.location 都探测,取不到就当没有地址(路由回落 "/")。
浏览器内的行为完全不变。
2026-09-21 09:37:19 +08:00