fix(ui): 抽屉删除按钮两 bug 终极修复

Bug1(触屏每行下面漏 ×):
  触屏设备在某些 WebView 上 (hover: hover) 命中,导致触摸后 :hover
  持续附着 -> .conv-del-inline 一直可见
  -> 把媒体查询从 (hover: hover) 收紧到 (hover: hover) and (pointer: fine)
  -> 触屏 pointer:coarse 不命中,内联 × 永远 display:none

Bug2(滑开后无法滑回去):
  onDown 记录 wasSwiped,horiz 识别后调 collapseAllSwiped() 时把自己
  swiped 类也清掉了,onMove 后半段走了「未滑开」分支,无法右滑回去
  修法:
  - collapseAllSwiped(except) 接受「排除自己」参数
  - 重写 onMove:touch 期间 item.style.transition='none' 避免动画粘滞
    统一 clamp 到 [-60, 0]:base=-60(已 swiped)/0(未 swiped) + dx
  - onUp 恢复 transition 让 snap 有动画
This commit is contained in:
2026-09-03 20:28:40 +08:00
parent b978c34c55
commit 2c3377a96b
2 changed files with 21 additions and 25 deletions
+3 -1
View File
@@ -490,7 +490,9 @@ footer { flex: none; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0
font-size: 16px; line-height: 1; padding: 0; cursor: pointer;
align-items: center; justify-content: center;
}
@media (hover: hover) {
@media (hover: hover) and (pointer: fine) {
/* 仅带精确指针(鼠标/触摸板)且能 hover 的设备才在行内露小 ×
触屏设备即使满足 (hover: hover) 也不命中,避免点按后持续 hover 露出 × */
.conv-item .conv-del-inline { display: flex; }
.conv-item:hover .conv-del-inline,
.conv-item:focus-within .conv-del-inline,