From: Pierre-Denis Vanduynslager Date: Sat, 26 Nov 2016 08:35:49 +0000 (-0500) Subject: Dropdown perf - on keyboard nav, find active item in the active dropdown rather than... X-Git-Tag: v4.0.0-alpha.6~412 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3606c5b9c5b288f17b29ea451470b260d4c1f327;p=thirdparty%2Fbootstrap.git Dropdown perf - on keyboard nav, find active item in the active dropdown rather than the whole document (#19953) --- diff --git a/js/src/dropdown.js b/js/src/dropdown.js index 644659266f..324eef7932 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -239,11 +239,7 @@ const Dropdown = (($) => { return } - let items = $.makeArray($(Selector.VISIBLE_ITEMS)) - - items = items.filter((item) => { - return item.offsetWidth || item.offsetHeight - }) + let items = $(parent).find(Selector.VISIBLE_ITEMS).get() if (!items.length) { return