1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-10-02 00:06:46 +02:00

Unbreak lines. (#32304)

This commit is contained in:
XhmikosR
2020-12-02 06:45:15 +02:00
committed by GitHub
parent f05d64225d
commit 701c6c6e77
9 changed files with 32 additions and 69 deletions

View File

@@ -367,8 +367,7 @@ class Dropdown extends BaseComponent {
}
static clearMenus(event) {
if (event && (event.button === RIGHT_MOUSE_BUTTON ||
(event.type === 'keyup' && event.key !== TAB_KEY))) {
if (event && (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY))) {
return
}
@@ -475,11 +474,13 @@ class Dropdown extends BaseComponent {
let index = items.indexOf(event.target)
if (event.key === ARROW_UP_KEY && index > 0) { // Up
// Up
if (event.key === ARROW_UP_KEY && index > 0) {
index--
}
if (event.key === ARROW_DOWN_KEY && index < items.length - 1) { // Down
// Down
if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
index++
}