From bd1e9541fec38b617395387430dcb73c820ede72 Mon Sep 17 00:00:00 2001 From: Helidium Date: Sun, 10 Aug 2014 11:49:29 +0200 Subject: [PATCH] Update jquery.sortable.js Destroy The destroy method doesn't clean itself properly. I dont know if this is the proper way of doing it, but in my code this works. Can you please make a full cleanup so no memory leaks are existing in case of spa ( Single page application ) --- source/js/jquery-sortable.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/js/jquery-sortable.js b/source/js/jquery-sortable.js index 5b61c35..e842ea9 100644 --- a/source/js/jquery-sortable.js +++ b/source/js/jquery-sortable.js @@ -626,6 +626,9 @@ this.group.containers = $.grep(this.group.containers, function(val){ return val != that }) + + if(this.group) + this.group._destroy() $.each(this.items || [], function(){ $.removeData(this, subContainerKey)