From 2bc216d9370be8aa5c263bf2eb76383c351fac11 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 3 Jun 2020 10:07:59 -0700 Subject: [PATCH] Clean up doc title when navigating away from Snapshot Restore. (#67906) Co-authored-by: Elastic Machine --- .../public/application/mount_management_section.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/snapshot_restore/public/application/mount_management_section.ts b/x-pack/plugins/snapshot_restore/public/application/mount_management_section.ts index 9697e24a7147..4ac4e57d1995 100644 --- a/x-pack/plugins/snapshot_restore/public/application/mount_management_section.ts +++ b/x-pack/plugins/snapshot_restore/public/application/mount_management_section.ts @@ -44,5 +44,11 @@ export async function mountManagementSection( }, }; - return renderApp(element, appDependencies); + const unmountAppCallback = renderApp(element, appDependencies); + + return () => { + // Change tab label back to Kibana. + docTitle.reset(); + unmountAppCallback(); + }; }