aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/event.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js
index 2e510eabf..e15a2ea63 100644
--- a/src/event.js
+++ b/src/event.js
@@ -221,7 +221,7 @@ jQuery.event = {
}
// remove generic event handler if no more handlers exist
- if ( jQuery.isEmptyObject( events[ type ] ) ) {
+ if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
removeEvent( elem, type, elemData.handle );
}