mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fix #10567. Make sure quickIs matches correct class name.
This commit is contained in:
parent
09c089aac9
commit
ee3eb6cabf
@ -16,7 +16,7 @@ var rnamespaces = /\.(.*)$/,
|
||||
// 0 1 2 3 4 5
|
||||
// [ _, tag, id, class, attrName, attrValue ]
|
||||
quick[1] = ( quick[1] || "" ).toLowerCase();
|
||||
quick[3] = quick[3] && new RegExp( "\\b" + quick[3] + "\\b" );
|
||||
quick[3] = quick[3] && new RegExp( "(?:^|\\w)" + quick[3] + "(?:\\w|$)" );
|
||||
}
|
||||
return quick;
|
||||
},
|
||||
|
@ -2452,6 +2452,14 @@ test("delegated events quickIs", function() {
|
||||
markup.find( "b" ).attr( "devo", "NO" );
|
||||
check( "b", "b|[devo='NO'] p|.D" );
|
||||
|
||||
markup
|
||||
.on( "blink", ".tricky", function() {
|
||||
ok( false, "triggered on wrong class name match" );
|
||||
})
|
||||
.find( "p" )
|
||||
.attr( "class", "tricky-match" )
|
||||
.trigger( "blink" );
|
||||
|
||||
markup.remove();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user