Fixed height of group share dropdown

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/3149
This commit is contained in:
Phil Hughes 2017-08-11 14:35:47 +01:00
parent fbd226ae48
commit 590a2035ef
No known key found for this signature in database
GPG key ID: DB8CE4B3A3EE91AB

View file

@ -111,8 +111,7 @@ window.GroupsSelect = (function() {
}; };
GroupsSelect.prototype.forceOverflow = function (e) { GroupsSelect.prototype.forceOverflow = function (e) {
const itemHeight = this.dropdown.querySelector('.select2-result:first-child').clientHeight; this.dropdown.style.height = `${Math.floor(this.dropdown.scrollHeight)}px`;
this.dropdown.style.height = `${Math.floor(this.dropdown.scrollHeight - (itemHeight * 0.9))}px`;
}; };
GroupsSelect.PER_PAGE = 20; GroupsSelect.PER_PAGE = 20;