shoelace-style/webawesome

wa-dropdown-item selection unreliable on slow taps in iOS standalone PWA

Open

#2,409 建立於 2026年5月18日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (157 fork)github user discovery
bughelp wanted

倉庫指標

Star
 (1,104 star)
PR 合併指標
 (PR 指標待抓取)

描述

Describe the bug

When Web Awesome is used inside an installed iOS PWA (standalone mode), wa-dropdown-item activation is unreliable. Tapping an item slowly, where the finger drifts a few pixels between touchstart and touchend, fails to trigger selection. Tapping quickly works consistently. The dropdown still opens fine, only the item selection is affected.

The issue does not occur in iOS Safari, only when the site is installed to the home screen and launched in standalone mode.

To Reproduce

  1. On an iPhone, open https://webawesome.com/docs/components/dropdown in Safari
  2. Add to Home Screen and launch the resulting PWA
  3. Open any of the dropdown examples on the page
  4. Tap an item slowly, letting your finger settle naturally on the target (small finger movement between press and release)
  5. Notice that the selection often does not fire
  6. Tap an item quickly, selection fires consistently

Expected behavior

Dropdown items should activate reliably regardless of tap speed, matching the behavior in iOS Safari.

Possible cause

iOS WebKit cancels synthetic click events in standalone mode when the touch point moves more than a small threshold between touchstart and touchend, the threshold is noticeably stricter than in Safari. If wa-dropdown-item activation is bound to click, this cancellation swallows the selection. Binding to pointerup (with an explicit movement tolerance) instead of click would avoid this.

Browser / OS

  • iOS version: 26.5
  • Device: iPhone 12 Mini
  • Web Awesome version: latest (reproduced on webawesome.com docs)
  • Reproducible: iOS Safari standalone (PWA) only

貢獻者指南