diff --git a/gui/src/renderer/components/KeyboardNavigation.tsx b/gui/src/renderer/components/KeyboardNavigation.tsx index fc11e5469968..8ed3caa540ae 100644 --- a/gui/src/renderer/components/KeyboardNavigation.tsx +++ b/gui/src/renderer/components/KeyboardNavigation.tsx @@ -25,12 +25,10 @@ export default function KeyboardNavigation(props: IKeyboardNavigationProps) { (event: KeyboardEvent) => { if (event.key === 'Escape') { const path = location.pathname as RoutePath; - if (!disableDismissForRoutes.includes(path)) { - if (event.shiftKey) { - history.pop(true); - } else { - backAction?.(); - } + if (event.shiftKey && !disableDismissForRoutes.includes(path)) { + history.pop(true); + } else { + backAction?.(); } } }, diff --git a/gui/src/renderer/components/main-view/ConnectionPanel.tsx b/gui/src/renderer/components/main-view/ConnectionPanel.tsx index 1d5c549254a0..8754547e1f74 100644 --- a/gui/src/renderer/components/main-view/ConnectionPanel.tsx +++ b/gui/src/renderer/components/main-view/ConnectionPanel.tsx @@ -4,6 +4,7 @@ import styled from 'styled-components'; import { useBoolean } from '../../lib/utilityHooks'; import { useSelector } from '../../redux/store'; import CustomScrollbars from '../CustomScrollbars'; +import { BackAction } from '../KeyboardNavigation'; import ConnectionActionButton from './ConnectionActionButton'; import ConnectionDetails from './ConnectionDetails'; import ConnectionPanelChevron from './ConnectionPanelChevron'; @@ -86,28 +87,30 @@ export default function ConnectionPanel() { useEffect(collapse, [tunnelState.state, collapse]); return ( - - {allowExpand && ( - - )} - - - - - - - - - - - - - - - - + + + {allowExpand && ( + + )} + + + + + + + + + + + + + + + + + ); }