Open jtpio opened 5 months ago
This could be related to an upstream change w.r.t focus handling, as first clicking on the file browser widget and then creating the new directory seems to be fine:
In the related command for creating a new directory, the file browser tracker currentWidget
seems to be set to the custom drive (in this case the GitHub:
drive):
const widget = tracker.currentWidget;
if (widget) {
return widget.createNewDirectory();
}
Looking more into it, and setting a handler for the tracker currentChanged
signal:
const { tracker } = factory;
tracker.currentChanged.connect(() => {
console.log('current changed');
});
The underlying file browser tracker only seems to update its currentWidget
when actively clicking on the widget themselves (clicking on the tab is not enough):
This was mitigated in https://github.com/jupyter/notebook/pull/7224.
Moving to 7.1.x
, in case this gets fixed upstream in JupyterLab: https://github.com/jupyterlab/jupyterlab/issues/15629
Testing with:
7.1.0a0
,7.1.0a1
or7.1.0a2
(or newer)The default file browser on the tree page tries to create files and directories in the installed drive, instead of the default file browser:
notebook-drive-issue.webm
Looking more closely, the model seems to be pointing to the custom drive (
GitHub:
)This is not an issue with
7.0.6
, so this is likely related to a change in the JupyterLab 4.1 pre-releases, or in some PRs targeting Notebook 7.1.Also this does not appear to be an issue in JupyterLab:
jupyterlab-create-new-folder-context-menu.webm