Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 34b3162

Browse files
committed
Fix baseline when direction-up positioning is used
#973
1 parent f953cc3 commit 34b3162

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/common.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ body > .select2-container.open {
4747
border-top-right-radius: 0;
4848
}
4949
.ui-select-container[theme="select2"].direction-up .ui-select-dropdown {
50+
bottom: 100%;
51+
top: auto;
52+
5053
border-radius: 4px; /* FIXME hardcoded value :-/ */
5154
border-bottom-left-radius: 0;
5255
border-bottom-right-radius: 0;
@@ -89,6 +92,9 @@ body > .select2-container.open {
8992

9093
/* Handle up direction Selectize */
9194
.ui-select-container[theme="selectize"].direction-up .ui-select-dropdown {
95+
bottom: 100%;
96+
top: auto;
97+
9298
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
9399

94100
margin-top: -2px; /* FIXME hardcoded value :-/ */
@@ -250,5 +256,7 @@ body > .ui-select-bootstrap.open {
250256

251257
/* Handle up direction Bootstrap */
252258
.ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown {
259+
bottom: 100%;
260+
top: auto;
253261
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
254262
}

src/uiSelectDirective.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ uis.directive('uiSelect',
275275
// Determine if the direction of the dropdown needs to be changed.
276276
if (offset.top + offset.height + offsetDropdown.height > $document[0].documentElement.scrollTop + $document[0].documentElement.clientHeight) {
277277
dropdown[0].style.position = 'absolute';
278-
dropdown[0].style.top = (offsetDropdown.height * -1) + 'px';
279278
element.addClass(directionUpClassName);
280279
}
281280

0 commit comments

Comments
 (0)