mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 21:37:37 -05:00
Regression: makes sure that all instances of a callback are removed. Unit test added.
This commit is contained in:
@@ -119,8 +119,8 @@ jQuery.Callbacks = function( options ) {
|
||||
// Remove a callback from the list
|
||||
remove: function() {
|
||||
if ( list ) {
|
||||
jQuery.each( arguments, function( index, arg ) {
|
||||
if ( ( index = jQuery.inArray( arg, list ) ) > -1 ) {
|
||||
jQuery.each( arguments, function( _, arg, index ) {
|
||||
while( ( index = jQuery.inArray( arg, list, index || 0 ) ) > -1 ) {
|
||||
list.splice( index, 1 );
|
||||
// Handle firing indexes
|
||||
if ( firing ) {
|
||||
|
||||
Reference in New Issue
Block a user