From bc53cb8bc53e858aee8665c8ed676147e768c244 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Oct 2017 12:04:47 -0700 Subject: dist --- dist/js/bootstrap.bundle.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dist/js/bootstrap.bundle.js') diff --git a/dist/js/bootstrap.bundle.js b/dist/js/bootstrap.bundle.js index 5f33f9c07..8af9a0108 100644 --- a/dist/js/bootstrap.bundle.js +++ b/dist/js/bootstrap.bundle.js @@ -4148,7 +4148,14 @@ var Dropdown = function ($$$1) { }; Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { - if (!REGEXP_KEYDOWN.test(event.which) || /button/i.test(event.target.tagName) && event.which === SPACE_KEYCODE || /input|textarea/i.test(event.target.tagName)) { + // If not input/textarea: + // - And not a key in REGEXP_KEYDOWN => not a dropdown command + // If input/textarea: + // - If space key => not a dropdown command + // - If key is other than escape + // - If key is not up or down => not a dropdown command + // - If trigger inside the menu => not a dropdown command + if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $$$1(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { return; } -- cgit v1.2.3