roojs-all.js
[roojs1] / roojs-debug.js
index 715aa79..e33dafc 100644 (file)
@@ -7166,32 +7166,32 @@ if(opt.anim.isAnimated()){
         /**
          * Looks at  the scrollable parent element
          */
-        findScrollableParent : function(){
-            
-            var el = Roo.get(this.dom.parentNode);
-            
-            while (
-                    el && 
-                    (
-                        !el.isScrollable() ||
-                        (
-                            el.isScrollable() &&
-                            (
-                                D.getViewHeight() - el.dom.clientHeight > 15 || 
-                                D.getViewWidth() - el.dom.clientWidth > 15
-                            )
-                        )
-                    ) &&
-                    el.dom.nodeName.toLowerCase() != 'body'
-            ){
-                el = Roo.get(el.dom.parentNode);
+        findScrollableParent : function()
+        {
+            var overflowRegex = /(auto|scroll)/;
+            
+            if(this.getStyle('position') === 'fixed'){
+                return Roo.isIOS ? Roo.get(document.body) : Roo.get(document.documentElement);
             }
             
-            if(!el.isScrollable()){
-                return null;
+            var excludeStaticParent = this.getStyle('position') === "absolute";
+            
+            for (var parent = this; (parent = Roo.get(parent.dom.parentNode));){
+                
+                if (excludeStaticParent && parent.getStyle('position') === "static") {
+                    continue;
+                }
+                
+                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 el;
+            return Roo.isIOS ? Roo.get(document.body) : Roo.get(document.documentElement);
         },
 
         /**
@@ -23076,6 +23076,17 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, {
             this.totalLength = Math.max(t, this.data.length+r.length);
             this.add(r);
         }
+        
+        if(this.parent && !Roo.isIOS && !this.useNativeIOS && this.parent.emptyTitle.length) {
+                
+            var e = new Roo.data.Record({});
+
+            e.set(this.parent.displayField, this.parent.emptyTitle);
+            e.set(this.parent.valueField, '');
+
+            this.insert(0, e);
+        }
+            
         this.fireEvent("load", this, r, options, o);
         if(options.callback){
             options.callback.call(options.scope || this, r, options, true);
@@ -43251,8 +43262,6 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
     insertAtCursor : function(text)
     {
         
-        
-        
         if(!this.activated){
             return;
         }
@@ -43803,7 +43812,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
                     node.className = '';
                 }
                 
-                if (a.value.match(/body/)) {
+                if (a.value.match(/^body$/)) {
                     node.className = '';
                 }
                 continue;
@@ -60182,20 +60191,18 @@ Roo.LoadMask.prototype = {
         }
         */
     
-        
-        
-        this.el.unmask(this.removeMask);
+        (function() { this.el.unmask(this.removeMask); }).defer(50, this);
     },
     // private
     onLoad : function()
     {
-        this.el.unmask(this.removeMask);
+        (function() { this.el.unmask(this.removeMask); }).defer(50, this);
     },
 
     // private
     onBeforeLoad : function(){
         if(!this.disabled){
-            this.el.mask(this.msg, this.msgCls);
+            (function() { this.el.mask(this.msg, this.msgCls); }).defer(50, this);
         }
     },