mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-20 00:10:24 +00:00
Don't open sidebar when a dialog is open (#16030)
This commit is contained in:
@@ -62,7 +62,7 @@ export const showDialog = async (
|
||||
dialogParams: unknown,
|
||||
dialogImport?: () => Promise<unknown>,
|
||||
addHistory = true
|
||||
) => {
|
||||
): Promise<boolean> => {
|
||||
if (!(dialogTag in LOADED)) {
|
||||
if (!dialogImport) {
|
||||
if (__DEV__) {
|
||||
@@ -71,7 +71,7 @@ export const showDialog = async (
|
||||
"Asked to show dialog that's not loaded and can't be imported"
|
||||
);
|
||||
}
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
LOADED[dialogTag] = {
|
||||
element: dialogImport().then(() => {
|
||||
@@ -128,6 +128,8 @@ export const showDialog = async (
|
||||
// so it's guaranteed to be on top of the other elements
|
||||
root.appendChild(dialogElement);
|
||||
dialogElement.showDialog(dialogParams);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
export const replaceDialog = (dialogElement: HassDialog) => {
|
||||
|
||||
Reference in New Issue
Block a user