Dashboard: Fix rogue modal when exiting edit mode (#115240)

* Dashboard: Fix rogue modal when exiting edit mode

* Remove unnecessary change
This commit is contained in:
Bogdan Matei
2025-12-12 17:17:34 +02:00
committed by GitHub
parent f3421b9718
commit eab5d2b30e
2 changed files with 5 additions and 1 deletions
@@ -206,6 +206,10 @@ export class DashboardSceneChangeTracker {
}
this._changesWorker!.onmessage = (e: MessageEvent<DashboardChangeInfo>) => {
if (!this._dashboard.state.isEditing) {
return;
}
this.updateIsDirty(!!e.data.hasChanges);
};
@@ -271,7 +271,7 @@ export class DashboardScene extends SceneObjectBase<DashboardSceneState> impleme
public onEnterEditMode = () => {
// Save this state
this._initialState = sceneUtils.cloneSceneObjectState(this.state);
this._initialState = sceneUtils.cloneSceneObjectState(this.state, { isDirty: false });
this._initialUrlState = locationService.getLocation();
// Switch to edit mode