diff --git a/js/dropdown.js b/js/dropdown.js index ae192e570d..64ec34d5d8 100644 --- a/js/dropdown.js +++ b/js/dropdown.js @@ -55,7 +55,7 @@ } Dropdown.prototype.keydown = function (e) { - if (!/(38|40|27|32)/.test(e.which)) return + if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return var $this = $(this) diff --git a/js/tests/unit/dropdown.js b/js/tests/unit/dropdown.js index 335795fde8..3cdf637ee0 100644 --- a/js/tests/unit/dropdown.js +++ b/js/tests/unit/dropdown.js @@ -224,4 +224,45 @@ $(function () { $(document.body).click() }) + test('should ignore keyboard events within s and