Skip to content

Commit 8621c99

Browse files
authored
fix(dropdown): nested dropdown positioning
When the dropdown is used as simple dropdown without JavaScript, it doesn't support more than two nested level of sub menus. It always exposes only two levels of sub menus. And despite the sub menu declares the value 'left' for the class name, it always apear rightward. It should respect the value 'left' from the class name and should be appeared leftward. When the dropdown menu is invoked with JavaScript, the last dropdown in the right menu doesn't behave properly and the sub menu inside the dropdown are overlapping each others. They should appear in the correct location like other dropdown menus.
1 parent defb29e commit 8621c99

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/definitions/modules/dropdown.less

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,9 @@
318318
}
319319

320320
/* Automatically float dropdown menu right on last menu item */
321-
.ui.menu .right.menu .dropdown:last-child .menu,
322-
.ui.menu .right.dropdown.item .menu,
323-
.ui.buttons > .ui.dropdown:last-child .menu {
324-
left: auto;
321+
.ui.menu .right.menu .dropdown:last-child .menu:not(.left),
322+
.ui.menu .right.dropdown.item .menu:not(.left),
323+
.ui.buttons > .ui.dropdown:last-child .menu:not(.left) {
325324
right: 0;
326325
}
327326

@@ -1097,7 +1096,7 @@ select.ui.dropdown {
10971096

10981097
.ui.dropdown > .left.menu .menu,
10991098
.ui.dropdown .menu .left.menu {
1100-
left: auto;
1099+
left: auto !important;
11011100
right: 100%;
11021101
margin: @leftSubMenuMargin !important;
11031102
border-radius: @leftSubMenuBorderRadius !important;
@@ -1318,12 +1317,12 @@ select.ui.dropdown {
13181317
opacity: 1;
13191318
}
13201319
.ui.simple.dropdown > .menu > .item:active > .menu,
1321-
.ui.simple.dropdown:hover > .menu > .item:hover > .menu {
1320+
.ui.simple.dropdown .menu .item:hover > .menu {
13221321
overflow: visible;
13231322
width: auto;
13241323
height: auto;
13251324
top: 0 !important;
1326-
left: 100% !important;
1325+
left: 100%;
13271326
opacity: 1;
13281327
}
13291328
& when (@variationDropdownDisabled) {

0 commit comments

Comments
 (0)