From fa171012d56f0c80c40134c22768550022229fe8 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Mon, 7 Feb 2022 16:06:43 +0700 Subject: [PATCH] Fix panel hide on escape with popup (#941) Signed-off-by: Andrey Sobolev --- packages/ui/src/components/PanelInstance.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/ui/src/components/PanelInstance.svelte b/packages/ui/src/components/PanelInstance.svelte index c6b8913806..b38c4d321e 100644 --- a/packages/ui/src/components/PanelInstance.svelte +++ b/packages/ui/src/components/PanelInstance.svelte @@ -18,6 +18,7 @@ import { afterUpdate } from 'svelte' import { Spinner } from '..' import { closePanel, PanelProps, panelstore as modal } from '../panelup' + import { popupstore } from '../popups' let modalHTML: HTMLElement let componentInstance: any @@ -31,6 +32,11 @@ $: props = $modal.panel function escapeClose () { + // Check if there is popup visible, then ignore + if ($popupstore.length > 0) { + return + } + if (componentInstance && componentInstance.canClose) { if (!componentInstance.canClose()) return }