mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 12:35:02 +02:00
Fix panel hide on escape with popup (#941)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user