Skip to content

Commit

Permalink
[dashboard] fix Chrome no longer hidden for reports (elastic#206988)
Browse files Browse the repository at this point in the history
Fixes elastic#205794

elastic#196275 removed `setIsVisible`
because https://github.com/elastic/kibana/pull/196275/files#r1811034594.
I could not reproduce the top nav disappearing and reappearing issue.

---------

Co-authored-by: Elastic Machine <[email protected]>
nreese and elasticmachine authored Jan 20, 2025
1 parent f4df585 commit 583b852
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -118,6 +118,13 @@ export function InternalDashboardTopNav({
dashboardTitleRef.current?.focus();
}, [title, viewMode]);

/*
* Manage chrome visibility when dashboard is in print mode.
*/
useEffect(() => {
if (!embedSettings && viewMode === 'print') coreServices.chrome.setIsVisible(false);
}, [embedSettings, viewMode]);

/**
* populate recently accessed, and set is chrome visible.
*/

0 comments on commit 583b852

Please sign in to comment.