diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2015-05-06 15:29:06 -0700 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2015-05-12 10:09:40 -0400 |
commit | 56bb677725b21415905e5c3eeb1e05be4480e780 (patch) | |
tree | 6ea93a20973e78f466412eeb58957af7e9075bdf /src/event.js | |
parent | 764dc949d0d65742606747ce75852d1b5dd59fcd (diff) | |
download | jquery-56bb677725b21415905e5c3eeb1e05be4480e780.tar.gz jquery-56bb677725b21415905e5c3eeb1e05be4480e780.zip |
Data: remove the expando when there's no more data
Fixes gh-1760
Close gh-2271
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/event.js b/src/event.js index b371b9a27..584ba9073 100644 --- a/src/event.js +++ b/src/event.js @@ -216,14 +216,9 @@ jQuery.event = { } } - // Remove the expando if it's no longer used + // Remove data and the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { - // Normally this should go through the data api - // but since event.js owns these properties, - // this exception is made for the sake of optimizing - // the operation. - delete elemData.handle; - delete elemData.events; + dataPriv.remove( elem, "handle events" ); } }, |