X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/src/adapter/yui-bridge.js diff --git a/src/adapter/yui-bridge.js b/src/adapter/yui-bridge.js index 48030591..e790ea31 100644 --- a/src/adapter/yui-bridge.js +++ b/src/adapter/yui-bridge.js @@ -1,8 +1,8 @@ /*! - * Ext JS Library 3.0.0 - * Copyright(c) 2006-2009 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ if(typeof YAHOO == "undefined"){ throw "Unable to load Ext, core YUI utilities (yahoo, dom, event) not found."; @@ -16,30 +16,15 @@ if(typeof YAHOO == "undefined"){ A = YAHOO.util.Anim, libFlyweight, version = YAHOO.env.getVersion('yahoo').version.split('.'), - mouseEnterSupported = parseInt(version[0]) >= 3, + mouseEnterSupported = parseInt(version[0], 10) >= 3, mouseCache = {}, - isXUL = Ext.isGecko ? function(node){ - return Object.prototype.toString.call(node) == '[object XULElement]'; - } : function(){ - }, isTextNode = Ext.isGecko ? function(node){ - try{ - return node.nodeType == 3; - }catch (e){ - return false; - } - } : function(node){ - return node.nodeType == 3; - }, elContains = function(parent, child){ + elContains = function(parent, child){ if(parent && parent.firstChild){ while(child){ if(child === parent){ return true; } - try{ - child = child.parentNode; - }catch (e){ - return false; - } + child = child.parentNode; if(child && (child.nodeType != 1)){ child = null; } @@ -47,8 +32,7 @@ if(typeof YAHOO == "undefined"){ } return false; }, checkRelatedTarget = function(e){ - var related = Ext.lib.Event.getRelatedTarget(e); - return !(isXUL(related) || elContains(e.currentTarget, related)); + return !elContains(e.currentTarget, Ext.lib.Event.getRelatedTarget(e)); }; Ext.lib.Dom = {