Skip to content

Commit e81e3b1

Browse files
author
scottjehl
committed
fixed positioning of selects in touch overflow scroll mode. Fixes jquery-archive#2415
1 parent 23e79fb commit e81e3b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

js/jquery.mobile.forms.select.custom.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,10 @@
298298
var self = this,
299299
menuHeight = self.list.parent().outerHeight(),
300300
menuWidth = self.list.parent().outerWidth(),
301-
scrollTop = $( window ).scrollTop(),
301+
activePage = $( ".ui-page-active" ),
302+
tOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled,
303+
tScrollElem = activePage.is( ".ui-native-fixed" ) ? activePage.find( ".ui-content" ) : activePage;
304+
scrollTop = tOverflow ? tScrollElem.scrollTop() : $( window ).scrollTop(),
302305
btnOffset = self.button.offset().top,
303306
screenHeight = window.innerHeight,
304307
screenWidth = window.innerWidth;

0 commit comments

Comments
 (0)