You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Keyboard-opened Cut/Copy/Paste menu doesn't focus its first item in the desktop app #45807
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
On Windows, run NVDA and open the T3 Code desktop app.
Move focus to a text field, such as the composer.
Open its context menu with the Applications key or Shift+F10.
Expected behavior
Focus lands on the first item of the menu (Cut, or the first spelling suggestion), and the screen reader announces it, the same way other keyboard-opened menus now behave since #41674.
Actual behavior
The menu opens, but no item is selected, so the screen reader announces no item until an arrow key is pressed.
This is the same bug as #37724 and #41660, but on a path the fix in #41674 didn't reach. That menu doesn't go through api.contextMenu.show(...). It is built in the main process from Electron's context-menu event (apps/desktop/src/window/DesktopWindow.ts, installContextMenu) and opened with ElectronMenu.popupTemplate (apps/desktop/src/electron/ElectronMenu.ts). That function calls menu.popup({ window, frame }) without sourceType, so Electron treats every opening as a mouse opening and selects nothing.
The event already reports how the menu was opened (params.menuSourceType), and Electron's docs say popup's sourceType should be set from that value. Passing it through popupTemplate should fix this. The same menu also holds spelling suggestions, Copy Link, Copy Email Address, Copy Image, and Reload in browser tabs, so all of those are affected too.
This only affects the desktop app. In a browser, this menu is the browser's own.
Activity