Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Workaround for the file browser tracker focus issue#7224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jtpio merged 2 commits intojupyter:mainfromjtpio:workaround-focus
Jan 26, 2024
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
Workaround for the file browser tracker focus issue
  • Loading branch information
@jtpio
jtpio committedJan 25, 2024
commitd9b4ca29b8149d5d6abdeddfd58b187692a124e5
16 changes: 16 additions & 0 deletionspackages/tree-extension/src/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,6 +18,7 @@ import {
FileBrowser,
Uploader,
IDefaultFileBrowser,
IFileBrowserFactory,
} from '@jupyterlab/filebrowser';

import { ISettingRegistry } from '@jupyterlab/settingregistry';
Expand DownExpand Up@@ -263,6 +264,7 @@ const notebookTreeWidget: JupyterFrontEndPlugin<INotebookTree> = {
ITranslator,
ISettingRegistry,
IToolbarWidgetRegistry,
IFileBrowserFactory,
],
optional: [
IRunningSessionManagers,
Expand All@@ -277,6 +279,7 @@ const notebookTreeWidget: JupyterFrontEndPlugin<INotebookTree> = {
translator: ITranslator,
settingRegistry: ISettingRegistry,
toolbarRegistry: IToolbarWidgetRegistry,
factory: IFileBrowserFactory,
manager: IRunningSessionManagers | null,
settingEditorTracker: ISettingEditorTracker | null,
jsonSettingEditorTracker: IJSONSettingEditorTracker | null
Expand DownExpand Up@@ -381,6 +384,19 @@ const notebookTreeWidget: JupyterFrontEndPlugin<INotebookTree> = {
}
);

const { tracker } = factory;

// TODO: remove
// Workaround to force the focus on the default file browser
// See https://github.com/jupyterlab/jupyterlab/issues/15629 for more info
const setCurrentToDefaultBrower = () => {
tracker['_pool'].current = browser;
};

tracker.widgetAdded.connect((sender, widget) =>
setCurrentToDefaultBrower()
);

return nbTreeWidget;
},
};
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp