Ticket #8777 undelegate by namespace
This commit is contained in:
parent
2ed81b44be
commit
4b0c26f0af
2 changed files with 39 additions and 8 deletions
13
src/event.js
13
src/event.js
|
@ -868,10 +868,10 @@ function trigger( type, elem, args ) {
|
|||
// Create "bubbling" focus and blur events
|
||||
if ( document.addEventListener ) {
|
||||
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
||||
|
||||
|
||||
// Attach a single capturing handler while someone wants focusin/focusout
|
||||
var attaches = 0;
|
||||
|
||||
|
||||
jQuery.event.special[ fix ] = {
|
||||
setup: function() {
|
||||
if ( attaches++ === 0 ) {
|
||||
|
@ -1027,6 +1027,14 @@ jQuery.each(["live", "die"], function( i, name ) {
|
|||
return this;
|
||||
}
|
||||
|
||||
if ( name === "die" && !types &&
|
||||
origSelector && origSelector[0] === "." ) {
|
||||
|
||||
context.unbind( origSelector );
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
if ( jQuery.isFunction( data ) ) {
|
||||
fn = data;
|
||||
data = undefined;
|
||||
|
@ -1184,3 +1192,4 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
|
|||
});
|
||||
|
||||
})( jQuery );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue