From 4f35c80bc7dc00bd33217c0d3d5404b137f5e9bb Mon Sep 17 00:00:00 2001 From: Sean Rand Date: Mon, 22 Apr 2013 19:07:01 +0200 Subject: [PATCH] Destroy spectrum before removing colorpicker divs Previously, every time refreshTags was called, sp-container divs were being left behind. We need to clean those up before removing the divs that spectrum was initialized with. --- public/js/selfoss-base.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/js/selfoss-base.js b/public/js/selfoss-base.js index fe6ae4ded6..7415b82f06 100644 --- a/public/js/selfoss-base.js +++ b/public/js/selfoss-base.js @@ -206,6 +206,7 @@ var selfoss = { */ refreshTags: function(tags) { var currentTag = $('#nav-tags li').index($('#nav-tags .active')); + $('.color').spectrum('destroy'); $('#nav-tags li:not(:first)').remove(); $('#nav-tags').append(tags); if(currentTag>=0)