Fix some dialog close history issues (#8102)

Co-authored-by: Zack Barett <arnett.zackary@gmail.com>
Co-authored-by: Philip Allgaier <mail@spacegaier.de>
This commit is contained in:
Bram Kragten
2021-01-22 13:33:10 +01:00
committed by GitHub
parent 599dd81e3c
commit 870f0bcbb1
8 changed files with 41 additions and 17 deletions

View File

@@ -87,6 +87,10 @@ export const showDialog = async (
dialogElement.showDialog(dialogParams);
};
export const replaceDialog = () => {
history.replaceState({ ...history.state, replaced: true }, "");
};
export const closeDialog = async (dialogTag: string): Promise<boolean> => {
if (!(dialogTag in LOADED)) {
return true;