mirror of
https://github.com/jquery/jquery.git
synced 2026-02-07 03:55:17 -05:00
Fix #11925, Pass eventHandle to special.teardown. Closes gh-831.
* Added unit test to confirm. The third assertion fails without the fix in ./src/event.js
This commit is contained in:
committed by
Dave Methvin
parent
d2b0c60840
commit
9bb3494ce9
@@ -181,7 +181,7 @@ jQuery.event = {
|
||||
// Remove generic event handler if we removed something and no more handlers exist
|
||||
// (avoids potential for endless recursion during removal of special event handlers)
|
||||
if ( eventType.length === 0 && origCount !== eventType.length ) {
|
||||
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
|
||||
if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
|
||||
jQuery.removeEvent( elem, type, elemData.handle );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user