2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-30 15:24:08 +03:00

Skip hidden dropdowns while focusing (#29523)

This commit is contained in:
Jeremy Jackson
2019-10-17 15:01:44 +00:00
committed by XhmikosR
parent 104385c508
commit c1ee395f80
3 changed files with 45 additions and 3 deletions
+6 -3
View File
@@ -138,9 +138,12 @@ const isVisible = element => {
}
if (element.style && element.parentNode && element.parentNode.style) {
return element.style.display !== 'none' &&
element.parentNode.style.display !== 'none' &&
element.style.visibility !== 'hidden'
const elementStyle = getComputedStyle(element)
const parentNodeStyle = getComputedStyle(element.parentNode)
return elementStyle.display !== 'none' &&
parentNodeStyle.display !== 'none' &&
elementStyle.visibility !== 'hidden'
}
return false