Sfoglia il codice sorgente

fix: hide modals when pressing Esc, fixes #8988 (#8994)

Jesse White 8 anni fa
parent
commit
f547c93a4f
1 ha cambiato i file con 1 aggiunte e 5 eliminazioni
  1. 1 5
      public/app/core/services/keybindingSrv.ts

+ 1 - 5
public/app/core/services/keybindingSrv.ts

@@ -214,12 +214,8 @@ export class KeybindingSrv {
       if (popups.length > 0) {
       if (popups.length > 0) {
         return;
         return;
       }
       }
-      // close modals
-      var modalData = $(".modal").data();
-      if (modalData && modalData.$scope && modalData.$scope.dismiss) {
-        modalData.$scope.dismiss();
-      }
 
 
+      scope.appEvent('hide-modal');
       scope.appEvent('hide-dash-editor');
       scope.appEvent('hide-dash-editor');
       scope.appEvent('panel-change-view', {fullscreen: false, edit: false});
       scope.appEvent('panel-change-view', {fullscreen: false, edit: false});
     });
     });