Description
When the window is maximized, the menu is rendered at an incorrect position. It appears to be positioned based on calculations from the previous window size
Reproduce
- Maximize the browser window.
- Restore the window to a non‑maximized state, then manually resize it.
- Move the mouse over the top menu bar multiple times, ensuring only mousemove events are triggered.
- Maximize the window again.
- Right‑click an element that should open a context menu (preferably an element in the main content area or a node in the left‑side tree).
Expected behavior
The context menu should always appear at the correct cursor position relative to the current window size and state.
Context
Root Cause Analysis:
In menu.ts, the transientCacheCounter increments during mousemove events but only decrements when a menu is rendered.
This leads to continuous accumulation of windowData entries while the window is in a non‑maximized state (during resize operations with mousemove events).
When the window is later maximized, the menu positioning logic incorrectly reads windowData values that correspond to the previous non‑maximized window state, resulting in misplaced menu rendering.
- Operating System and version: win10 @lumino/widgets version 2.5.0
- Browser and version:
- JupyterLab version:
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
Description
When the window is maximized, the menu is rendered at an incorrect position. It appears to be positioned based on calculations from the previous window size
Reproduce
Expected behavior
The context menu should always appear at the correct cursor position relative to the current window size and state.
Context
Root Cause Analysis:
In
menu.ts, thetransientCacheCounterincrements duringmousemoveevents but only decrements when a menu is rendered.This leads to continuous accumulation of
windowDataentries while the window is in a non‑maximized state (during resize operations withmousemoveevents).When the window is later maximized, the menu positioning logic incorrectly reads
windowDatavalues that correspond to the previous non‑maximized window state, resulting in misplaced menu rendering.Troubleshoot Output
Command Line Output
Browser Output