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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user