diff --git a/public/app/plugins/panel/canvas/CanvasContextMenu.tsx b/public/app/plugins/panel/canvas/CanvasContextMenu.tsx index bfdd0b6a4d953..e3cb75922ee5a 100644 --- a/public/app/plugins/panel/canvas/CanvasContextMenu.tsx +++ b/public/app/plugins/panel/canvas/CanvasContextMenu.tsx @@ -91,20 +91,22 @@ export const CanvasContextMenu = ({ scene }: Props) => { }} className={styles.menuItem} /> - { - if (scene.inlineEditingCallback) { - if (inlineEditorOpen) { - activePanel.panel.inlineEditButtonClose(); - } else { - scene.inlineEditingCallback(); + {!scene.isPanelEditing && ( + { + if (scene.inlineEditingCallback) { + if (inlineEditorOpen) { + activePanel.panel.inlineEditButtonClose(); + } else { + scene.inlineEditingCallback(); + } } - } - closeContextMenu(); - }} - className={styles.menuItem} - /> + closeContextMenu(); + }} + className={styles.menuItem} + /> + )} ); };