fix(rectification): keep the choice selected state inside the button
Independent Staging Quality Gate / validate (push) Successful in 10m25s
Independent Staging Quality Gate / publish (push) Successful in 1m57s

The outer focus ring overflowed the message bubble and stacked on the existing selected border. Draw keyboard focus inset and skip auto-focusing the first option.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-02 21:44:55 +08:00
co-authored by Cursor
parent 7b82d43c82
commit 3568801509
5 changed files with 48 additions and 10 deletions
+16
View File
@@ -7617,3 +7617,19 @@
- 复发自:无
- 修复版本:待发布
## BUG-495 | 选择题选中项外圈粗描边溢出气泡
- 状态:resolved
- 首次发现:2026-09-02
- 最近更新:2026-09-02
- 影响面:`.birth-time-choice-option:focus-visible`、嵌入 `RectificationChoiceCard`、`.message-bubble`
- 用户现象:点选 A 后(或新题自动聚焦第一项时),选项外侧出现一圈粗的红棕色描边,圆角对不齐,看起来像边框溢出。已有选中底色和边框已经够用。
- 触发条件:校正聊天里嵌入选择题;选项在 `.message-bubble { overflow: hidden }` 内。新题会 `focus()` 第一项,点击后按钮仍保持 `:focus-visible`。
- 根因:`:focus-visible` 使用 `outline-offset: 2px`(会话页还有 `3px`),描边画在按钮外面,被气泡裁切。选中态 `border-color: var(--color-action)` 与焦点色相同,叠成双层粗边。
- 修复:焦点环改为 `outline-offset: -2px` 画在按钮内。已选中项不再叠加 outline(高对比模式除外)。嵌入卡不再自动聚焦第一项。
- 验证:`rectification-varga-style-copy` 锁 inset offset、选中无 outline、卡片不 `.focus()`。
- 防复发:选择题焦点环不得使用正 `outline-offset`。选中态只保留 `data-selected` 的边框和底色。
- 相关记录:BUG-490
- 复发自:无
- 修复版本:待发布