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

Commit 41ebd98

Browse files
committed
fix(dropdown): avoid matching 138 & 140
1 parent 4af83ad commit 41ebd98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dropdown/dropdown.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
266266

267267
element.bind('keydown', function(e) {
268268

269-
if ( /(38|40)/.test(e.which)) {
269+
if ([38, 40].indexOf(e.which) !== -1) {
270270

271271
e.preventDefault();
272272
e.stopPropagation();

0 commit comments

Comments
 (0)