-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix navigation from stacked dialogs with the same name #23698
Conversation
Wouldn't it be better to make sure a dialog can never be in the open stack more than once? As it is technically not possible to have the same dialog open twice... |
then you won't be able to navigate back to the previous more info dialog but this is not possible even now so I guess you're right |
Added a check so a dialog can only be in the stack once. Still left the check in |
We should btw clean up this stuff: diff --git a/src/dialogs/more-info/ha-more-info-dialog.ts b/src/dialogs/more-info/ha-more-info-dialog.ts
index c37e337aa..ffb46c998 100644
--- a/src/dialogs/more-info/ha-more-info-dialog.ts
+++ b/src/dialogs/more-info/ha-more-info-dialog.ts
@@ -180,16 +180,6 @@ export class MoreInfoDialog extends LitElement {
}
private _setView(view: View) {
- history.replaceState(
- {
- ...history.state,
- dialogParams: {
- ...history.state?.dialogParams,
- view,
- },
- },
- ""
- );
this._currView = view;
}
|
Hi Guys, The issue still appears to be still here after upgrading to 2025.1.3 was the fix implemented in this version? |
@RMMTSLLP This fix hasn't been released yet |
* Fix navigation from stacked dialogs * lint fix * Keep only 1 instance per dialog tag in the stack
Proposed change
When 2 the same dialog appears twice in the stack, the first
closeDialog
call closes both, so the second one is missing from the stack when the loop gets to it. Not sure the closing behavior should be changed but for the linked bug, checking the state is enough.Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: