var idSeed = 0;
var ua = navigator.userAgent.toLowerCase();
+ Roo.log('-------ua---------');
+ Roo.log(ua);
+
var isStrict = document.compatMode == "CSS1Compat",
isOpera = ua.indexOf("opera") > -1,
isSafari = (/webkit|khtml/).test(ua),
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,
/**
var cls = [
Roo.isIE ? "roo-ie"
+ : Roo.isIE11 ? "roo-ie11"
: Roo.isGecko ? "roo-gecko"
: Roo.isOpera ? "roo-opera"
: Roo.isSafari ? "roo-safari" : ""];
/**
* 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";
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);
},
/**