Skip to content

Commit 541f963

Browse files
author
Gabriel Schulhof
committed
Custom select: Must un-hide popup container before calculating height.
1 parent 556a4e3 commit 541f963

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/widgets/forms/select.custom.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,17 @@ define( [
352352
_decideFormat: function() {
353353
var self = this,
354354
$window = $.mobile.window,
355+
// Show popup container so that menuHeight will be reported correctly
356+
popupContainer = self.listbox.parent().show(),
355357
selfListParent = self.list.parent(),
356358
menuHeight = selfListParent.outerHeight(),
357359
scrollTop = $window.scrollTop(),
358360
btnOffset = self.button.offset().top,
359361
screenHeight = $window.height();
360362

363+
// Restore popup container's hidden state
364+
popupContainer.hide();
365+
361366
function focusMenuItem() {
362367
var selector = self.list.find( "." + $.mobile.activeBtnClass + " a" );
363368
if ( selector.length === 0 ) {

0 commit comments

Comments
 (0)