1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-20 04:11:39 +02:00

Dropdown perf - on keyboard nav, find active item in the active dropdown rather than the whole document (#19953)

This commit is contained in:
Pierre-Denis Vanduynslager
2016-11-26 03:35:49 -05:00
committed by Mark Otto
parent 308bc77dbb
commit 3606c5b9c5

View File

@@ -239,11 +239,7 @@ const Dropdown = (($) => {
return return
} }
let items = $.makeArray($(Selector.VISIBLE_ITEMS)) let items = $(parent).find(Selector.VISIBLE_ITEMS).get()
items = items.filter((item) => {
return item.offsetWidth || item.offsetHeight
})
if (!items.length) { if (!items.length) {
return return