Procházet zdrojové kódy

Merge pull request #14102 from grafana/change-tab-in-edit-modefix

fix: dont setViewMode when nothing has changed
Torkel Ödegaard před 7 roky
rodič
revize
435079c6e7
1 změnil soubory, kde provedl 1 přidání a 2 odebrání
  1. 1 2
      public/app/features/dashboard/view_state_srv.ts

+ 1 - 2
public/app/features/dashboard/view_state_srv.ts

@@ -126,8 +126,7 @@ export class DashboardViewState {
 
 
       if (!panel.fullscreen) {
       if (!panel.fullscreen) {
         this.enterFullscreen(panel);
         this.enterFullscreen(panel);
-      } else {
-        // already in fullscreen view just update the view mode
+      } else if (this.dashboard.meta.isEditing !== this.state.edit) {
         this.dashboard.setViewMode(panel, this.state.fullscreen, this.state.edit);
         this.dashboard.setViewMode(panel, this.state.fullscreen, this.state.edit);
       }
       }
     } else if (this.fullscreenPanel) {
     } else if (this.fullscreenPanel) {