Skip to content
Merged
Changes from all commits
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
22 changes: 16 additions & 6 deletions packages/application-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
ISanitizer,
ISplashScreen,
IToolbarWidgetRegistry,
showErrorMessage,
} from '@jupyterlab/apputils';

import { ConsolePanel } from '@jupyterlab/console';
Expand Down Expand Up @@ -658,14 +659,23 @@ const title: JupyterFrontEndPlugin<void> = {
return;
}

const result = await renameDialog(docManager, current.context);
try {
const result = await renameDialog(docManager, current.context);

// activate the current widget to bring the focus
if (current) {
current.activate();
}
// activate the current widget to bring the focus
if (current) {
current.activate();
}

if (result === null) {
if (result === null) {
return;
}
} catch (error) {
showErrorMessage(
trans.__('Rename Error'),
(error as Error).message ||
trans.__('An error occurred while renaming the file.')
);
return;
}

Expand Down
Loading