Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
Destroy spectrum before removing colorpicker divs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
seanrand committed Apr 22, 2013
1 parent 714c657 commit 4f35c80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions public/js/selfoss-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4f35c80

Please sign in to comment.