Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
refactor(dropdown): remove regex to not match 138 and 140
Browse files Browse the repository at this point in the history
Closes #4892
  • Loading branch information
Foxandxss authored and wesleycho committed Nov 13, 2015
1 parent 58205a8 commit 4dab96e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dropdown/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
if (evt.which === 27) {
openScope.focusToggleElement();
closeDropdown();
} else if (openScope.isKeynavEnabled() && /(38|40)/.test(evt.which) && openScope.isOpen) {
} else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen) {
evt.preventDefault();
evt.stopPropagation();
openScope.focusDropdownEntry(evt.which);
Expand Down

0 comments on commit 4dab96e

Please sign in to comment.