diff options
| author | Pierre-Denis Vanduynslager <[email protected]> | 2016-11-26 03:35:49 -0500 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-11-26 00:35:49 -0800 |
| commit | 3606c5b9c5b288f17b29ea451470b260d4c1f327 (patch) | |
| tree | 12ae4c8505287a43553c24253ed3f2a502d158db /js/src | |
| parent | 308bc77dbb412e4df1194459a9b34ad72da02ca6 (diff) | |
| download | bootstrap-3606c5b9c5b288f17b29ea451470b260d4c1f327.tar.xz bootstrap-3606c5b9c5b288f17b29ea451470b260d4c1f327.zip | |
Dropdown perf - on keyboard nav, find active item in the active dropdown rather than the whole document (#19953)
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/dropdown.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js index 644659266..324eef793 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 |
