Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: N/a <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: Version: 1.77.3 Commit: Date: 2023-04-12T09:16:02.548Z Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.77.3 Chrome/102.0.5005.196 Electron/19.1.11 Safari/537.36 OS Version: Steps to Reproduce: click a file in the Explorer. The background color of the row changes from blue to grey. Esc to close the context menu. The background color changes back. is not possible to emulate with an extension using a webview context menu. Fixed by my PR
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
I'll verify this.
<img width="320" alt="image" src=""<img width="334" alt="image" src=""I can confirm that on that there is a style change when right-clicking a file in the Explorer. But it's not the one described, the text colour changes slightly (this may be a theme difference). What's an extension that uses a file list in a web view that I can verify?
I think any webview context menu should work for this, not necessarily a file list.
They would need to add a CSS rule with the new class name to make an actual change in visual appearance. You can verify the class is applied on the body element using the Webview Developer Tools.
this could probably be edited
Here's a snippet from my project, the selector doesn't work while the context menu is up, so I repeat the same rules with
Oh, and the original issue was reported with the previous default theme.
Thanks

Discussion:
<meta charset="UTF-8"> <meta http-equiv="Content-Security-Policy" <del> content="default-src 'none'; script-src 'sha256-N4YFn5ze5crjPqMK/opogKs7bSGWtf3lmjV/3LfbSOs=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> </del> <ins> content="default-src 'none'; script-src 'sha256-7Y08cqii1UgeZbSST9r8UPSownOSMa3/PiKe77avh7I=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> </ins> <!-- Disable pinch zooming --> <meta name="viewport"

} }); <ins> // propagate vscode-context-menu-visible class hostMessaging.onMessage('set-context-menu-visible', (_event, data) => { const target = getActiveFrame(); if (target && target.contentDocument) { target.contentDocument.body.classList.toggle('vscode-context-menu-visible', data.visible); } }); </ins> hostMessaging.onMessage('set-title', async (_event, data) => { const target = getActiveFrame(); if (target) {

this._register(Event.runAndSubscribe(webviewThemeDataProvider.onThemeDataChanged, () => this.style())); this._register(_accessibilityService.onDidChangeReducedMotion(() => this.style())); this._register(_accessibilityService.onDidChangeScreenReaderOptimized(() => this.style())); <ins> this._register(contextMenuService.onDidShowContextMenu(() => this._send('set-context-menu-visible', { visible: true }))); this._register(contextMenuService.onDidHideContextMenu(() => this._send('set-context-menu-visible', { visible: false }))); </ins> this._confirmBeforeClose = configurationService.getValue<string>('window.confirmBeforeClose');

location: string | undefined; }; 'set-confirm-before-close': string; <ins> 'set-context-menu-visible': { visible: boolean }; </ins> 'initial-scroll-position': number; 'content': UpdateContentEvent; 'set-title': string | undefined;