Skip to content

Commit

Permalink
fix(dropdown): keep overflow visible for non simple selection
Browse files Browse the repository at this point in the history
This partly reverts #2219 and only adds the overflow setting in case of a simple selection dropdown where a possible scrollbar is only needed. Since 2.9.0 a simple menu item dropdown unfortunately also applied a scrollbar, which is wrong.

This PR also fixes upward menu positioning in case a floating simple upward dropdown is used
  • Loading branch information
lubber-de authored Nov 20, 2022
1 parent 7259c34 commit b4fc00c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/definitions/modules/dropdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -1479,21 +1479,29 @@ select.ui.dropdown {

.ui.simple.active.dropdown > .menu,
.ui.simple.dropdown:hover > .menu {
overflow: auto;
overflow: visible;
width: auto;
height: auto;
top: 100%;
opacity: 1;
}
.ui.simple.dropdown > .menu > .item:active > .menu,
.ui.simple.dropdown .menu .item:hover > .menu {
overflow: auto;
overflow: visible;
width: auto;
height: auto;
top: 0 !important;
left: 100%;
opacity: 1;
}
& when (@variationDropdownSelection) {
.ui.simple.selection.active.dropdown > .menu,
.ui.simple.selection.dropdown:hover > .menu,
.ui.simple.selection.dropdown > .menu > .item:active > .menu,
.ui.simple.selection.dropdown .menu .item:hover > .menu {
overflow: auto;
}
}
.ui.simple.dropdown > .menu > .item:active > .left.menu,
.ui.simple.dropdown .menu .item:hover > .left.menu,
.right.menu .ui.simple.dropdown > .menu > .item:active > .menu:not(.right),
Expand Down Expand Up @@ -1553,7 +1561,7 @@ select.ui.dropdown {
.ui:not(.upward).floating.dropdown > .menu {
margin-top: @floatingMenuDistance;
}
.ui.upward.floating.dropdown > .menu {
.ui.upward.floating.dropdown:not(.simple) > .menu {
margin-bottom: @floatingMenuDistance;
}
}
Expand Down

0 comments on commit b4fc00c

Please sign in to comment.