Closed brichet closed 11 months ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
Some more context after a little introspection:
Adding the tabindex
attribute to tabs allows them to get focus (that's the point).
In Jupyterlab, the focusTracker
tracks every element added to the shell, including the TabBar
.
Since tabs never get focus, the TabBar
could not be the current
widget of the focusTracker
.
Right-clicking on a selected tab should bring up the context menu for the widget displayed (the open document in the case of mainArea
). This uses the focusTracker.current
widget to choose whether or not to display certain options.
Now that the TabBar
can receive focus, it becomes the current widget when a tab is right-clicked, which change the behavior of the context menu.
Description
Some context menu in
Jupyterlab
are not working correctly since https://github.com/jupyterlab/lumino/pull/583.It seems that the focus is not managed the same way when the tabs contain
tabindex="0"
attribute.Reproduce
Update lumino to v2023.6.22 and right click on a Notebook tab in dock panel.
The
currentwidget
seems to be now the tabbar instead of the tab item, which breaks the behavior of the context menu.Expected behavior
The focus correctly handling the tab item.
Reference
This bug has been found in https://github.com/jupyterlab/jupyterlab/pull/14610