diff --git a/.github/instructions/sessions.instructions.md b/.github/instructions/sessions.instructions.md index 6dec29dbb1c85..69f15894b95cf 100644 --- a/.github/instructions/sessions.instructions.md +++ b/.github/instructions/sessions.instructions.md @@ -17,4 +17,5 @@ When working on files under `src/vs/sessions/`, use these skills for detailed gu The Agents window can run on touch-capable platforms (notably iOS). Follow these rules for all DOM interaction code: - Do not use `EventType.MOUSE_DOWN`, `EventType.MOUSE_UP`, or `EventType.MOUSE_MOVE` with `addDisposableListener` directly — on iOS, these events don't fire because the platform uses pointer events. Use `addDisposableGenericMouseDownListener`, `addDisposableGenericMouseUpListener`, or `addDisposableGenericMouseMoveListener` instead, which automatically select the correct event type per platform. +- For custom clickable elements (e.g. picker triggers, title bar pills, or other `
`/`` elements styled as buttons) that open pickers or menus on click, listen to **both** `EventType.CLICK` and `TouchEventType.Tap` and call `Gesture.addTarget` on the element. On touch devices, including iOS, VS Code relies on the gesture system to emit `TouchEventType.Tap`, and `EventType.CLICK` alone may not reliably fire there. The base `Button` class already does this correctly, so this rule applies to custom non-`