From 4eefa85bc07d032177c1a12b003c1d94c8846206 Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Wed, 6 Dec 2017 00:41:27 +0000 Subject: [PATCH] Selection via enter keypress doesn't stop the keypress immediate event propagation This means that when selecting an item the enter keydown event will be received by other handlers on the same element. --- src/typeahead/typeahead.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/typeahead/typeahead.js b/src/typeahead/typeahead.js index fe40ffc1b5..5183c4d1b7 100644 --- a/src/typeahead/typeahead.js +++ b/src/typeahead/typeahead.js @@ -172,12 +172,12 @@ var Typeahead = (function() { if ($selectable = this.menu.getActiveSelectable()) { if (this.select($selectable)){ $e.preventDefault(); - $e.stopPropagation(); + $e.stopImmediatePropagation(); } } else if(this.autoselect) { if (this.select(this.menu.getTopSelectable())) { $e.preventDefault(); - $e.stopPropagation(); + $e.stopImmediatePropagation(); } } },