From f547c93a4f6ac9594251e7fa6051338d900ce3f7 Mon Sep 17 00:00:00 2001 From: Jesse White Date: Mon, 7 Aug 2017 03:23:33 -0400 Subject: [PATCH] fix: hide modals when pressing Esc, fixes #8988 (#8994) --- public/app/core/services/keybindingSrv.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts index 46d108b43dfd..f03ca8c80033 100644 --- a/public/app/core/services/keybindingSrv.ts +++ b/public/app/core/services/keybindingSrv.ts @@ -214,12 +214,8 @@ export class KeybindingSrv { if (popups.length > 0) { 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('panel-change-view', {fullscreen: false, edit: false}); });