Skip to content

Commit 66c76e3

Browse files
SteveTheTechieHarris
authored andcommitted
Account for $checkboxes ul element padding.
1 parent a5aba8b commit 66c76e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jquery.multiselect.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,10 +1118,11 @@
11181118
// Deduct height of header & border/padding to find height available for checkboxes.
11191119
var $header = self.$header.filter(':visible');
11201120
var headerHeight = $header.outerHeight(true) + self._jqHeightFix($header);
1121-
var borderPaddingHt = this.$menu.outerHeight(false) - this.$menu.height();
1121+
var menuBorderPaddingHt = this.$menu.outerHeight(false) - this.$menu.height();
1122+
var cbBorderPaddingHt = this.$checkboxes.outerHeight(false) - this.$checkboxes.height();
11221123

11231124
optionHeight = self._parse2px(optionHeight, self.element, true).px;
1124-
maxHeight = Math.min(optionHeight, maxHeight) - headerHeight - borderPaddingHt;
1125+
maxHeight = Math.min(optionHeight, maxHeight) - headerHeight - menuBorderPaddingHt - cbBorderPaddingHt;
11251126
}
11261127
else if (optionHeight.toLowerCase() === 'size') {
11271128
// Overall height based on native select 'size' attribute

0 commit comments

Comments
 (0)