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:
Petar Petrov
2024-12-10 13:26:57 +02:00
committed by GitHub
parent 84157c8ea5
commit ed625d4e0b
3 changed files with 103 additions and 174 deletions

View File

@@ -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(