isLinux = (ua.indexOf("linux") != -1),
isSecure = window.location.href.toLowerCase().indexOf("https") === 0,
isIOS = /iphone|ipad/.test(ua),
+ isAndroid = /android/.test(ua),
isTouch = (function() {
try {
if (ua.indexOf('chrome') != -1 && ua.indexOf('android') == -1) {
/** @type Boolean */
isIOS : isIOS,
/** @type Boolean */
+ isAndroid : isAndroid,
+ /** @type Boolean */
isTouch : isTouch,
/**
/**
* Looks at the scrollable parent element
*/
- findScrollableParent : function(){
-
+ findScrollableParent : function()
+ {
var overflowRegex = /(auto|scroll)/;
if(this.getStyle('position') === 'fixed'){
- return Roo.get(document.body);
+ return Roo.isAndroid ? Roo.get(document.documentElement) : Roo.get(document.body);
}
var excludeStaticParent = this.getStyle('position') === "absolute";
continue;
}
- if (
- parent.dom.nodeName.toLowerCase() != 'body' ||
- overflowRegex.test(parent.getStyle('overflow') + parent.getStyle('overflow-x') + parent.getStyle('overflow-y'))
- ){
+ if (overflowRegex.test(parent.getStyle('overflow') + parent.getStyle('overflow-x') + parent.getStyle('overflow-y'))){
return parent;
}
+
+ if(parent.dom.nodeName.toLowerCase() == 'body'){
+ return Roo.isAndroid ? Roo.get(document.documentElement) : Roo.get(document.body);
+ }
}
- return Roo.get(document.body);
+ return Roo.isAndroid ? Roo.get(document.documentElement) : Roo.get(document.body);
},
/**