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

Commit 514940b

Browse files
committed
Cap activeIndex's minimum to -1.
1 parent 9d6cd8b commit 514940b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@
551551
break;
552552
case KEY.UP:
553553
if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode
554-
else if (ctrl.activeIndex > 0 || (ctrl.search.length === 0 && ctrl.tagging.isActivated)) { ctrl.activeIndex--; }
554+
else if (ctrl.activeIndex > 0 || (ctrl.search.length === 0 && ctrl.tagging.isActivated && ctrl.activeIndex > -1)) { ctrl.activeIndex--; }
555555
break;
556556
case KEY.TAB:
557557
if (!ctrl.multiple || ctrl.open) ctrl.select(ctrl.items[ctrl.activeIndex], true);

0 commit comments

Comments
 (0)