Skip to content

fix: improve touch support for sessions app pickers and overlays#311183

Merged
rebornix merged 1 commit intomainfrom
rebornix/sessions-touch-support
Apr 18, 2026
Merged

fix: improve touch support for sessions app pickers and overlays#311183
rebornix merged 1 commit intomainfrom
rebornix/sessions-touch-support

Conversation

@rebornix
Copy link
Copy Markdown
Member

Replace EventType.MOUSE_DOWN with addDisposableGenericMouseDownListener for overlay dismissal in runScriptAction, sessionsWalkthrough, sessionsPolicyBlocked, and sessionsTitleBarWidget. This uses POINTER_DOWN on iOS where pointer events are available.

Add touch-action: manipulation to picker trigger elements and the session title bar pill to eliminate the 300ms tap delay on touch devices.

Replace EventType.MOUSE_DOWN with addDisposableGenericMouseDownListener
for overlay dismissal in runScriptAction, sessionsWalkthrough,
sessionsPolicyBlocked, and sessionsTitleBarWidget. This uses
POINTER_DOWN on iOS where pointer events are available.

Add touch-action: manipulation to picker trigger elements and the
session title bar pill to eliminate the 300ms tap delay on touch devices.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 18, 2026 18:09
@github-actions
Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 32776b54 Current: 69640829

Changed (1)

editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves touch interactions in the Agents (sessions) window by making overlay-dismiss and picker-trigger interactions respond more reliably on iOS/touch devices.

Changes:

  • Replaces EventType.MOUSE_DOWN listeners with addDisposableGenericMouseDownListener for overlay/backdrop interactions to use pointerdown on iOS when available.
  • Adds touch-action: manipulation to picker trigger elements (and the session title pill) to reduce/remove tap delay on touch devices.
  • Adds cursor: pointer styling for the session title bar pill to better communicate interactivity.
Show a summary per file
File Description
src/vs/sessions/contrib/welcome/browser/sessionsWalkthrough.ts Uses generic mouse/pointer down listener for walkthrough overlay background interactions.
src/vs/sessions/contrib/sessions/browser/sessionsTitleBarWidget.ts Switches pill “down” handler to generic mouse/pointer down listener for touch support.
src/vs/sessions/contrib/sessions/browser/media/sessionsTitleBarWidget.css Adds cursor: pointer and touch-action: manipulation to the session title pill.
src/vs/sessions/contrib/policyBlocked/browser/sessionsPolicyBlocked.ts Uses generic mouse/pointer down listener for policy-blocked overlay background interactions.
src/vs/sessions/contrib/chat/browser/runScriptAction.ts Uses generic mouse/pointer down listener for run-script modal backdrop dismissal.
src/vs/sessions/contrib/chat/browser/media/chatWidget.css Adds touch-action: manipulation to chat picker trigger elements.
src/vs/sessions/contrib/chat/browser/media/chatInput.css Adds touch-action: manipulation to chat config toolbar action labels.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/sessions/contrib/sessions/browser/sessionsTitleBarWidget.ts:197

  • In addDisposableGenericMouseDownListener on iOS this becomes a pointerdown listener. Calling preventDefault() on pointerdown can suppress the subsequent synthetic click event on touch devices, which would prevent the EventType.CLICK handler from firing and stop the sessions picker from opening. Consider removing preventDefault() here (keeping stopPropagation()), or only calling preventDefault() for mouse pointers / moving the picker-open logic to the generic down handler.
			this._dynamicDisposables.add(addDisposableGenericMouseDownListener(sessionPill, (e) => {
				e.preventDefault();
				e.stopPropagation();
			}));
			this._dynamicDisposables.add(addDisposableListener(sessionPill, EventType.CLICK, (e) => {
				e.preventDefault();
				e.stopPropagation();
				this._showSessionsPicker();
			}));
  • Files reviewed: 7/7 changed files
  • Comments generated: 0

@rebornix rebornix enabled auto-merge (squash) April 18, 2026 18:50
@rebornix rebornix merged commit 742f436 into main Apr 18, 2026
44 of 45 checks passed
@rebornix rebornix deleted the rebornix/sessions-touch-support branch April 18, 2026 18:56
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants