Skip to content

Commit 85de8cc

Browse files
committed
Update select2.js
above function doesn't work great
1 parent 261dad0 commit 85de8cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

select2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,8 +1218,8 @@ the specific language governing permissions and limitations under the Apache Lic
12181218
};
12191219

12201220
if (above) {
1221-
css.bottom = windowHeight - offset.top;
1222-
css.top = 'auto';
1221+
css.top = offset.top - dropHeight;
1222+
css.bottom = 'auto';
12231223
this.container.addClass("select2-drop-above");
12241224
$dropdown.addClass("select2-drop-above");
12251225
}

0 commit comments

Comments
 (0)