yfzhou0904/dsh-plugin-gallery--plugins-touch-tooltips0

@yfzhou/dsh-touch-tooltips

Suppresses DSH's hover/focus tooltip bubbles on touch devices, where a tap leaves them stuck on screen.

包名
@yfzhou/dsh-touch-tooltips
版本
0.1.0
许可证
MIT
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:yfzhou0904/dsh-plugin-gallery#0bca5d11a39014e69e5a571bf6d6ca97a491b2bb&path:plugins/touch-tooltips

DSH Touch Tooltips

Suppresses DSH's hover/focus tooltip bubbles on touch devices.

The problem

DSH's Tooltip component (from @deepseek-ai/dsh-client-ui-primitives) shows a bubble on mouseenter and focus, and only hides it on mouseleave or blur. On a phone, tapping a button fires a synthetic mouseenter plus focus, so the bubble appears — but nothing ever fires mouseleave/blur unless you tap empty space. The result is a tooltip that lingers on screen after the button has already done its job.

The fix

Tooltips are a hover affordance and carry no meaning on a touchscreen, so this plugin simply hides them on coarse-pointer devices:

@media (pointer: coarse) {
  [role="tooltip"] {
    display: none !important;
  }
}

The anchor's accessible name is still exposed to assistive technology, so accessibility is unaffected. Desktop hover tooltips are left untouched.

Install

dsh plugin --profile web add @yfzhou/dsh-touch-tooltips

For local development:

dsh plugin --profile web add ./plugins/touch-tooltips

Browser plugins require a page refresh after first installation or upgrade.

Compatibility

Targets DSH 0.1.0-rc.6. It patches role="tooltip" elements, so it keeps working as long as DSH renders tooltip bubbles with that role.