mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fixed an issue with #id expression parsing, an issue with formatting, and removed the try{} block from around event firings.
This commit is contained in:
parent
a457262ef5
commit
b5256caee6
16
jquery/jquery.js
vendored
16
jquery/jquery.js
vendored
@ -318,6 +318,16 @@ function $(a,c) {
|
||||
return self;
|
||||
}
|
||||
|
||||
(function(){
|
||||
var b = navigator.userAgent.toLowerCase();
|
||||
$.browser =
|
||||
( /safari/.test(b) && "safari" ) ||
|
||||
( /opera/.test(b) && "opera" ) ||
|
||||
( /msie/.test(b) && "msie" ) ||
|
||||
( !/compatible/.test(b) && "mozilla" ) ||
|
||||
"other";
|
||||
})();
|
||||
|
||||
$.apply = function(o,f,a) {
|
||||
a = a || [];
|
||||
if ( f.apply ) {
|
||||
@ -514,7 +524,7 @@ $.Select = function( t, context ) {
|
||||
if ( m[1] == "#" ) { // Ummm, should make this work in all XML docs
|
||||
var oid = document.getElementById(m[2]);
|
||||
r = oid ? [oid] : [];
|
||||
t = t.replace( re, "" );
|
||||
t = t.replace( re2, "" );
|
||||
} else {
|
||||
if ( m[2] === "" || m[1] == "." ) { m[2] = "*"; }
|
||||
|
||||
@ -545,10 +555,12 @@ $.Select = function( t, context ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( t ) {
|
||||
var val = $.filter(t,r);
|
||||
ret = r = val.r;
|
||||
t = $.cleanSpaces(val.t);
|
||||
}
|
||||
}
|
||||
|
||||
if ( ret && ret[0] == context ) { ret.shift(); }
|
||||
done = $.merge( done, ret );
|
||||
@ -789,7 +801,6 @@ $.event.handle = function(event) {
|
||||
}
|
||||
|
||||
for ( var i = 0; i < handlers.length; i++ ) {
|
||||
try {
|
||||
if ( handlers[i].constructor == Function ) {
|
||||
this.$$handleEvent = handlers[i];
|
||||
if (this.$$handleEvent(event) === false) {
|
||||
@ -798,7 +809,6 @@ $.event.handle = function(event) {
|
||||
returnValue = false;
|
||||
}
|
||||
}
|
||||
} catch(e){}
|
||||
}
|
||||
return returnValue;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user