Skip to main content

Bug Tracker

Side navigation

#5200 closed bug (invalid)

Opened September 10, 2009 05:08PM UTC

Closed December 02, 2010 08:07AM UTC

1.2.6 or higher causes type error in Galio

Reported by: rhythmicdevil Owned by: rhythmicdevil
Priority: trivial Milestone: 1.3
Component: selector Version: 1.3.2
Keywords: Galio Cc:
Blocked by: Blocking:
Description

When simply loading a page in Galio I get a type error notification. I traced the error to Sizzle.find and the following comparison:

if ( left.substr( left.length - 1 ) !== "\\\\"

I wrapped this in a conditional checking for undefined and the error went away. The new function follows.

Sizzle.find = function(expr, context, isXML){

var set, match;

if ( !expr ) {

return [];

}

for ( var i = 0, l = Expr.order.length; i < l; i++ ) {

var type = Expr.order[i], match;

if ( (match = Expr.match[ type ].exec( expr )) ) {

var left = RegExp.leftContext;

if(typeof(left) != 'undefined')

{

if ( left.substr( left.length - 1 ) !== "\\\\" )

{

match[1] = (match[1] || "").replace(/\\\\/g, "");

set = Expr.find[ type ]( match, context, isXML );

if ( set != null )

{

expr = expr.replace( Expr.match[ type ], "" );

break;

}

}

}

}

}

if ( !set ) {

set = context.getElementsByTagName("*");

}

return {set: set, expr: expr};

};

Attachments (0)
Change History (4)

Changed September 14, 2009 06:04PM UTC by flesler comment:1

priority: blockertrivial

Changed December 16, 2009 03:15AM UTC by dmethvin comment:2

component: coreselector
owner: → john

Changed November 16, 2010 04:23AM UTC by dmethvin comment:3

owner: johnrhythmicdevil
status: newpending

Please provide a test case.

Changed December 02, 2010 08:07AM UTC by trac-o-bot comment:4

resolution: → invalid
status: pendingclosed

Automatically closed due to 14 days of inactivity.