Skip to content

Commit cc57d2e

Browse files
committed
Fixing failing unit tests
Missed a '.' on the selectors in resize. Fix #676
1 parent 58c7c34 commit cc57d2e

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

src/jquery.multiselect.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,13 +522,13 @@
522522
ulHeight += $(li).outerHeight(true);
523523
});
524524
if(ulHeight > this.options.height) {
525-
this.menu.children("ui-multiselect-checkboxes").css("overflow", "auto");
525+
this.menu.children(".ui-multiselect-checkboxes").css("overflow", "auto");
526526
ulHeight = this.options.height;
527527
} else {
528-
this.menu.children("ui-multiselect-checkboxes").css("overflow", "hidden");
528+
this.menu.children(".ui-multiselect-checkboxes").css("overflow", "hidden");
529529
}
530530

531-
this.menu.children("ui-multiselect-checkboxes").height(ulHeight);
531+
this.menu.children(".ui-multiselect-checkboxes").height(ulHeight);
532532
this.menu.height(ulHeight + headerHeight);
533533
},
534534

tests/unit/methods.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,17 +162,16 @@
162162

163163
test("position", function() {
164164
expect(2);
165-
166165
var left = "500px";
167166

168167
el = $("select").clone().appendTo(body).multiselect();
168+
// Position doesn't work reliably on hidden elements
169+
el.multiselect("open");
169170

170171
// move the button
171172
button().css({ position: "absolute", left: left });
172-
173173
// sanity check the fact that the menu and button are out of sync
174174
notEqual(menu().css("left"), left, "After moving the button, the menu remains in its old position");
175-
176175
// update the menu position
177176
el.multiselect("position");
178177

tests/unit/options.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@
133133
test("height", function(){
134134
expect(2);
135135

136-
var height = 234;
136+
var height = 100;
137137

138138
el = $("select").multiselect({ height: height }).multiselect("open");
139-
equals( height, menu().find("ul.ui-multiselect-checkboxes").height(), 'height after opening property set to '+height );
139+
equals( height, menu().find("ul.ui-multiselect-checkboxes").height(), 'height after opening property set to '+ height );
140140

141141
// change height and re-test
142-
height = 333;
142+
height = 300;
143143
el.multiselect("option", "height", height);
144-
equals( height, menu().find("ul.ui-multiselect-checkboxes").height(), 'changing value through api to '+height );
144+
equals( height, menu().find("ul.ui-multiselect-checkboxes").height(), 'changing value through api to '+ height );
145145

146146
el.multiselect("destroy");
147147
});

0 commit comments

Comments
 (0)