-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
Milestone
Description
Property __cache from module Utils still retains DOM element from destroyed select2 instance.
Reproducible here: https://jsfiddle.net/wgnmvfbj/2/
Click on create then destroy, cache size will not go back to 0.
I've tracked down the issue to the following line adding to cache an item that is never removed:
select2/src/js/select2/core.js
Line 600 in ef33f4b
Utils.StoreData($container[0], 'element', this.$element); |
I didn't find any reason for caching $container, so I assume the fix could be simply removing that line.