diff options
author | Mark Otto <markdotto@gmail.com> | 2017-10-28 22:04:47 +0300 |
---|---|---|
committer | Mark Otto <markdotto@gmail.com> | 2017-10-28 22:04:47 +0300 |
commit | bc53cb8bc53e858aee8665c8ed676147e768c244 (patch) | |
tree | db727998f38513724755bc64c469c739755cea78 /dist/js/bootstrap.js | |
parent | 380c920f1c32681fdd0f3375b2ea3e1739fdd6a9 (diff) |
dist
Diffstat (limited to 'dist/js/bootstrap.js')
-rw-r--r-- | dist/js/bootstrap.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index 702395b712..3306187529 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -1717,7 +1717,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; } |