-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugbugs found in the applicationbugs found in the applicationsecondary-windowissues related to multi or secondary window supportissues related to multi or secondary window supportterminalissues related to the terminalissues related to the terminal
Milestone
Description
Bug Description:
If I open a context menu in a secondary window, the context menu shows up in the main window and not on the secondary window. The position in the window seems to be correct, but the window is the wrong one.
Debugging into it briefly (in the browser case at least), it seems that Phosphor needs to be made aware of the current window. At the moment it just plainly adds the context menu to document. So we need to pass the correct window or its document from the context-menu event on to Phosphor's openRootMenu() function.
The call stack is as follows:
- openRootMenu (theia/node_modules/@phosphor/widgets/lib/menu.js:1133)
- __webpack_modules__.../../node_modules/@phosphor/widgets/lib/menu.js.Menu.open (theia/node_modules/@phosphor/widgets/lib/menu.js:437)
- open (theia/packages/core/src/browser/menu/browser-menu-plugin.ts:276)
- doRender (theia/packages/core/src/browser/menu/browser-context-menu-renderer.ts:43)
- render (theia/packages/core/src/browser/context-menu-renderer.ts:85)
- contextMenuListener (theia/packages/terminal/src/browser/terminal-widget-impl.ts:262)
Steps to Reproduce:
- Start Theia
- Open a terminal view
- Detach the terminal view into a secondary window
- Open context menu via right-click or context menu key
- Observe how the context menu doesn't show up in the secondary window but in the main window
Additional Information
- Operating System: Ubuntu 22.04
- Theia Version: master (3deecfe)
Related:
Metadata
Metadata
Assignees
Labels
bugbugs found in the applicationbugs found in the applicationsecondary-windowissues related to multi or secondary window supportissues related to multi or secondary window supportterminalissues related to the terminalissues related to the terminal