microsoft / microsoft/vscode

Integrated Browser: Element picker does not highlight during mobile emulation

Open
#332,182 1 comment 0 reactions 2 assignees Claimed by @kycutler View on GitHub
browser-integration bug
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

### Description

When **Mobile Emulation** is enabled in the Integrated Browser, **Add Element to Chat** does not update its hover highlight as the pointer moves.

#### Steps to Reproduce

1. Open a page in the Integrated Browser.
2. Enable **Device Emulation**.
3. Enable **Mobile Emulation**.
4. Start **Add Element to Chat** (`Ctrl+Shift+C`).
5. Move the pointer over elements in the page.

#### Expected Behavior

The element under the pointer is highlighted, as it is when Mobile Emulation is disabled.

#### Actual Behavior

The highlight does not follow the pointer while Mobile Emulation is enabled.

#### Reproduction

The circular touch cursor moves, but the element highlight does not follow the pointer.

Mobile Emulation before the fix

#### Impact

**Add Element to Chat** relies on hover highlighting as the primary visual feedback for identifying the element that will be attached. Without it, users cannot reliably determine which responsive or mobile-specific element they are selecting.

Disabling Mobile Emulation is not an equivalent workaround because it can change the viewport, responsive layout, element visibility, and pointer hit targets. As a result, the element-to-chat workflow cannot be used reliably when investigating mobile-specific UI in the Integrated Browser.

#### Technical Findings

While the element picker is active:

- without Mobile Emulation, the page receives `pointermove` events
- with Mobile Emulation, the page receives no `pointermove` events
- touch capability remains enabled
- the emulated viewport remains active
- the `(pointer: coarse)` media state remains active

### Issue Details

| Item | Value |
| --- | --- |
| Issue Category | Bug |
| Target | VS Code |
| Feature | Integrated Browser |
| VS Code Version | 1.135.0 (Code OSS source build, `cac1904de60`) |
| OS Version | Microsoft Windows NT 10.0.26200.0 (unlikely to be relevant; the issue is isolated to CDP input emulation) |

### Extensions

Extensions disabled. The issue still reproduces.

Diagnostics not included

| Diagnostic | Reason |
| --- | --- |
| CPU, GPU, load, memory, screen reader, and VM information | The issue reproduces in the CDP input-emulation path and does not depend on system performance or rendering hardware. |
| Running processes and workspace metadata | This is not a performance issue, and the reproduction does not depend on workspace contents or other processes. |
| A/B experiments | The issue reproduces in the current Code OSS source build and is isolated to Mobile Emulation input handling. |

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.