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
Let multiple tabs exist on a tab bar. If one of them is current and focused and it is closed, focus automatically reverts to the document body (body), not to the new current tab.
Part of the jupyterlab functionality such as hotkeys relies on relevant element being focused. As a result of next tab not getting focus, you can't use "close tab" hotkey (option + W) more than once in a row (please see issue #6648 and discussion in it).
Reverted jupyterlab PR 7349 attempted to fix this by listening to currentChanged messages and activating a "changed to" widget. But Lumino fires multiple currentChanged messages in a quick succession any time tab is closed programmatically so there's a raise condition on jupyterlab side (see discussion in PR 7349 and in PR 7684 that reverts it).
Lumino has access to source of truth, currentIndex parameter in TabBar / correct sequence of calls to set currentIndex(), so focusing a tab every time it becomes current seems like it would solve the problem (for example, inside set currentIndex() call). If you have other thoughts on how to fix this or if I'm missing something in my reasoning, please let me know.
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
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! 👋
Side note: the focus change after changing tab was implicated in some performance issues in my profiling. A change to the status quo may help or make things worse, in any case we want to run a manual benchmark so please tag me on a PR if you are planning to work on it.
Let multiple tabs exist on a tab bar. If one of them is current and focused and it is closed, focus automatically reverts to the document body (
body
), not to the new current tab.Part of the jupyterlab functionality such as hotkeys relies on relevant element being focused. As a result of next tab not getting focus, you can't use "close tab" hotkey (option + W) more than once in a row (please see issue #6648 and discussion in it).
Reverted jupyterlab PR 7349 attempted to fix this by listening to
currentChanged
messages and activating a "changed to" widget. But Lumino fires multiplecurrentChanged
messages in a quick succession any time tab is closed programmatically so there's a raise condition on jupyterlab side (see discussion in PR 7349 and in PR 7684 that reverts it).Lumino has access to source of truth,
currentIndex
parameter in TabBar / correct sequence of calls toset currentIndex()
, so focusing a tab every time it becomes current seems like it would solve the problem (for example, insideset currentIndex()
call). If you have other thoughts on how to fix this or if I'm missing something in my reasoning, please let me know.lumino/packages/widgets/src/tabbar.ts
Lines 238 to 244 in e7cc1ad
The text was updated successfully, but these errors were encountered: