diff --git a/public/app/features/dashboard-scene/scene/keyboardShortcuts.ts b/public/app/features/dashboard-scene/scene/keyboardShortcuts.ts index 10fc2feac74..e9399c8feb4 100644 --- a/public/app/features/dashboard-scene/scene/keyboardShortcuts.ts +++ b/public/app/features/dashboard-scene/scene/keyboardShortcuts.ts @@ -1,4 +1,4 @@ -import { SetPanelAttentionEvent } from '@grafana/data'; +import { locationUtil, SetPanelAttentionEvent } from '@grafana/data'; import { config, locationService } from '@grafana/runtime'; import { sceneGraph, VizPanel } from '@grafana/scenes'; import appEvents from 'app/core/app_events'; @@ -43,7 +43,8 @@ export function setupKeyboardShortcuts(scene: DashboardScene) { key: 'v', onTrigger: withFocusedPanel(scene, (vizPanel: VizPanel) => { if (!scene.state.viewPanelScene) { - locationService.push(getViewPanelUrl(vizPanel)); + const url = locationUtil.stripBaseFromUrl(getViewPanelUrl(vizPanel)); + locationService.push(url); } }), }); @@ -173,7 +174,8 @@ export function setupKeyboardShortcuts(scene: DashboardScene) { if (sceneRoot instanceof DashboardScene) { const panelId = getPanelIdForVizPanel(vizPanel); if (!scene.state.editPanel) { - locationService.push(getEditPanelUrl(panelId)); + const url = locationUtil.stripBaseFromUrl(getEditPanelUrl(panelId)); + locationService.push(url); } } }),