From 351e2e496f2641f3e77603bf951389aadec35bd7 Mon Sep 17 00:00:00 2001 From: edward Date: Tue, 9 Jan 2018 14:07:16 +0800 Subject: [PATCH] roojs-core.js roojs-core-debug.js --- roojs-core-debug.js | 13 +++++++------ roojs-core.js | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 87fab9f92b..f19ffd29ea 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -7166,8 +7166,8 @@ if(opt.anim.isAnimated()){ /** * Looks at the scrollable parent element */ - findScrollableParent : function(){ - + findScrollableParent : function() + { var overflowRegex = /(auto|scroll)/; if(this.getStyle('position') === 'fixed'){ @@ -7182,12 +7182,13 @@ if(opt.anim.isAnimated()){ 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.isIOS ? Roo.get(document.body) : Roo.get(document.documentElement); + } } return Roo.isIOS ? Roo.get(document.body) : Roo.get(document.documentElement); diff --git a/roojs-core.js b/roojs-core.js index a73f18e9d3..a5b5f4cc05 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -307,8 +307,8 @@ if(!L){return null;}var id=L.id;if(K!==true&&id&&Roo.Element.cache[id]){return R return this;},enableDisplayMode:function(J){this.setVisibilityMode(El.DISPLAY);if(typeof J!="undefined"){this.originalDisplay=J;}return this;},findParent:function(J,K,L){var p=this.dom,b=document.body,M=0,dq=Roo.DomQuery,N;K=K||50;if(typeof K!="number"){N=Roo.getDom(K); K=10;}while(p&&p.nodeType==1&&M