X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-core-debug.js;h=54ce8c6b7ccff17237e40afdac945446e5444c5b;hb=5a09638750d76b5c2f42753ab924401909761f61;hp=5a246a85f40cc144517e3d879dcea6f638e36aae;hpb=d83e6f560d529fee838ee06b89f8f6872c2dd0ea;p=roojs1 diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 5a246a85f4..54ce8c6b7c 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -5066,7 +5066,11 @@ Roo.DomQuery = function(){ } var r = [], ri = -1, cn; for(var i = 0, ci; ci = c[i]; i++){ - if((' '+ci.className+' ').indexOf(v) != -1){ + + + if((' '+ + ( (ci instanceof SVGElement) ? ci.className.baseVal : ci.className) + +' ').indexOf(v) != -1){ r[++ri] = ci; } } @@ -5084,7 +5088,7 @@ Roo.DomQuery = function(){ return n.htmlFor; } if(attr == "class" || attr == "className"){ - return n.className; + return (n instanceof SVGElement) ? n.className.baseVal : n.className; } return n.getAttribute(attr) || n[attr]; @@ -5188,7 +5192,7 @@ Roo.DomQuery = function(){ a = Roo.DomQuery.getStyle(ci, attr); } else if(attr == "class" || attr == "className"){ - a = ci.className; + a = (ci instanceof SVGElement) ? ci.className.baseVal : ci.className; }else if(attr == "for"){ a = ci.htmlFor; }else if(attr == "href"){ @@ -7153,6 +7157,9 @@ if(opt.anim.isAnimated()){ { var dom = typeof element == "string" ? document.getElementById(element) : element; + + this.listeners = {}; + if(!dom){ // invalid id/element return null; } @@ -7173,7 +7180,7 @@ if(opt.anim.isAnimated()){ */ this.id = id || Roo.id(dom); - this.listeners = {}; + return this; // assumed for cctor? }; var El = Roo.Element; @@ -8294,7 +8301,7 @@ if(opt.anim.isAnimated()){ //action on double tap goes below }, - + /** * Removes an event handler from this element * @param {String} eventName the type of event to remove @@ -8304,7 +8311,7 @@ if(opt.anim.isAnimated()){ */ removeListener : function(eventName, fn, scope){ Roo.EventManager.removeListener(this.dom, eventName, fn); - if (typeof(this.listeners[eventName]) == 'undefined') { + if (typeof(this.listeners) == 'undefined' || typeof(this.listeners[eventName]) == 'undefined') { return this; } this.listeners[eventName].removeListener(fn, scope); @@ -9445,7 +9452,7 @@ if(opt.anim.isAnimated()){ Roo.EventManager.removeResizeListener(this.fitToParentDelegate); // always remove previous fitToParent delegate from onWindowResize this.fitToParentDelegate = Roo.emptyFn; // remove reference to previous delegate if (monitorResize === true && !this.dom.parentNode) { // check if this Element still exists - return; + return this; } var p = Roo.get(targetParent || this.dom.parentNode); this.setSize(p.getComputedWidth() - p.getFrameWidth('lr'), p.getComputedHeight() - p.getFrameWidth('tb'));