mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 02:49:51 +00:00
Simplify dialog navigation to fix back button (#23220)
* Simplify dialog navigation to fix back btn * add back comment * manage dialog stack in the manager instead of history * handle dialogs that refuse to close
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { historyPromise } from "../state/url-sync-mixin";
|
||||
import { fireEvent } from "./dom/fire_event";
|
||||
import { mainWindow } from "./dom/get_main_window";
|
||||
|
||||
@@ -17,11 +16,6 @@ export interface NavigateOptions {
|
||||
export const navigate = (path: string, options?: NavigateOptions) => {
|
||||
const replace = options?.replace || false;
|
||||
|
||||
if (historyPromise) {
|
||||
historyPromise.then(() => navigate(path, options));
|
||||
return;
|
||||
}
|
||||
|
||||
if (__DEMO__) {
|
||||
if (replace) {
|
||||
mainWindow.history.replaceState(
|
||||
|
||||
Reference in New Issue
Block a user