From 180a0d1da7b6b1da1bfbe2d0fae4f039b778ed68 Mon Sep 17 00:00:00 2001 From: Yosef Hoffman Date: Wed, 29 Jun 2016 05:51:49 -0400 Subject: [PATCH] Close modals with ESC key Currently, when the user opens a modal window and clicks on an element that is NOT a form input and tries to close the modal window by pressing the ESC key, the modal window will not close. This patch allows the user to close modals by pressing the ESC key no matter what element on the page has the focus. The fix is taken from https://getbootstrap.com/javascript/#live-demo Co-Authored-By: Rob Cresswell Change-Id: I4d19fb400dee8132d9d490507c06989c07ce42ac Closes-Bug: #1561193 --- horizon/templates/horizon/common/_modal.html | 1 + horizon/templates/horizon/common/_workflow.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/horizon/templates/horizon/common/_modal.html b/horizon/templates/horizon/common/_modal.html index f49ed13832..7516cdc1fa 100644 --- a/horizon/templates/horizon/common/_modal.html +++ b/horizon/templates/horizon/common/_modal.html @@ -1,5 +1,6 @@