From e81e3b19c01ea60be46be09e63c6db89c0457046 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Sat, 24 Sep 2011 01:00:42 -0400 Subject: [PATCH] fixed positioning of selects in touch overflow scroll mode. Fixes #2415 --- js/jquery.mobile.forms.select.custom.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.forms.select.custom.js b/js/jquery.mobile.forms.select.custom.js index d7f21952..12054d8c 100644 --- a/js/jquery.mobile.forms.select.custom.js +++ b/js/jquery.mobile.forms.select.custom.js @@ -298,7 +298,10 @@ var self = this, menuHeight = self.list.parent().outerHeight(), menuWidth = self.list.parent().outerWidth(), - scrollTop = $( window ).scrollTop(), + activePage = $( ".ui-page-active" ), + tOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled, + tScrollElem = activePage.is( ".ui-native-fixed" ) ? activePage.find( ".ui-content" ) : activePage; + scrollTop = tOverflow ? tScrollElem.scrollTop() : $( window ).scrollTop(), btnOffset = self.button.offset().top, screenHeight = window.innerHeight, screenWidth = window.innerWidth;