fix: improve touch support for sessions app pickers and overlays#311183
Merged
fix: improve touch support for sessions app pickers and overlays#311183
Conversation
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>
Contributor
Contributor
There was a problem hiding this comment.
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_DOWNlisteners withaddDisposableGenericMouseDownListenerfor overlay/backdrop interactions to usepointerdownon iOS when available. - Adds
touch-action: manipulationto picker trigger elements (and the session title pill) to reduce/remove tap delay on touch devices. - Adds
cursor: pointerstyling 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
addDisposableGenericMouseDownListeneron iOS this becomes apointerdownlistener. CallingpreventDefault()onpointerdowncan suppress the subsequent syntheticclickevent on touch devices, which would prevent theEventType.CLICKhandler from firing and stop the sessions picker from opening. Consider removingpreventDefault()here (keepingstopPropagation()), or only callingpreventDefault()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
roblourens
approved these changes
Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: manipulationto picker trigger elements and the session title bar pill to eliminate the 300ms tap delay on touch devices.