From 91f329e4488c667c04ea0f3ccc8dc11aaa7124ef Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Tue, 1 Jul 2014 05:50:31 +0200 Subject: Only close modal if escape was hit with keydown; fixes #13929 --- js/tests/unit/modal.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'js/tests') diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index a415129aa..5ee58616f 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -164,6 +164,44 @@ $(function () { .bootstrapModal('show') }) + test('should close modal when escape key is pressed via keydown', function () { + stop() + + var div = $('