Commit f547c93a by Jesse White Committed by Torkel Ödegaard

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

parent c0b0a54a
...@@ -214,12 +214,8 @@ export class KeybindingSrv { ...@@ -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});
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment