From 9ae8cc0337c5c640199a49e04b8cffbce019fff7 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Wed, 3 Jun 2020 13:32:34 -0700 Subject: [PATCH] [7.8] Clean up doc title when navigating away from Snapshot Restore. (#67906) (#68139) Co-authored-by: Elastic Machine 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(); + }; }