1
0
mirror of synced 2024-11-25 06:16:08 +03:00

recalculate $dropdown height after drop-above class added

This commit is contained in:
Jonathan Toms 2014-11-05 00:10:15 -05:00
parent 4e19d87927
commit a83ae7858a

View File

@ -1325,10 +1325,11 @@ the specific language governing permissions and limitations under the Apache Lic
};
if (above) {
css.top = offset.top - dropHeight;
css.bottom = 'auto';
this.container.addClass("select2-drop-above");
$dropdown.addClass("select2-drop-above");
dropHeight = $dropdown.outerHeight(false);
css.top = offset.top - dropHeight;
css.bottom = 'auto';
}
else {
css.top = dropTop;