diff options
| author | Mark Otto <[email protected]> | 2017-10-28 12:04:47 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-10-28 12:04:47 -0700 |
| commit | bc53cb8bc53e858aee8665c8ed676147e768c244 (patch) | |
| tree | db727998f38513724755bc64c469c739755cea78 /dist/js/bootstrap.bundle.js | |
| parent | 380c920f1c32681fdd0f3375b2ea3e1739fdd6a9 (diff) | |
| download | bootstrap-bc53cb8bc53e858aee8665c8ed676147e768c244.tar.xz bootstrap-bc53cb8bc53e858aee8665c8ed676147e768c244.zip | |
dist
Diffstat (limited to 'dist/js/bootstrap.bundle.js')
| -rw-r--r-- | dist/js/bootstrap.bundle.js | 9 |
1 files changed, 8 insertions, 1 deletions
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; } |
