Fix Safari bug in child selector
authorGrauw
Thu Jun 11 22:11:17 2009 +0200 (13 months ago)
changeset 32e6b71f1bafef
parent 31 5f70f4e63d49
child 33 bfb663c6d6fe
Fix Safari bug in child selector
src/selector.js
     1.1 --- a/src/selector.js	Thu Jun 11 22:10:05 2009 +0200
     1.2 +++ b/src/selector.js	Thu Jun 11 22:11:17 2009 +0200
     1.3 @@ -42,6 +42,7 @@
     1.4  	var oThis = this;	// to make references to this class without hard coding the actual name
     1.5  
     1.6  	var browser_ie = !!window.ActiveXObject;
     1.7 +	var browser_webkit = navigator.userAgent.indexOf('AppleWebKit') != -1;
     1.8  
     1.9  	function extend(oBase) {
    1.10  		// create new prototype object that inherits from cBase
    1.11 @@ -447,7 +448,7 @@
    1.12  			var aNodes,
    1.13  				oSimpleSelector = this.simpleSelectors[0],
    1.14  				iStart = 0;
    1.15 -			if (oNode.children && oSimpleSelector.type == oSimpleSelector.TYPE) {
    1.16 +			if (oNode.children && !browser_webkit && oSimpleSelector.type == oSimpleSelector.TYPE) {
    1.17  				aNodes = oNode.children.tags(oSimpleSelector.arg1);
    1.18  				iStart++;
    1.19  			} else {