diff --git a/CHANGELOG b/CHANGELOG index b62dccc8f..d970c1795 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ CHANGELOG Roundcube Webmail - Fix unread count after purge on a folder that is not currently selected (#7051) - Fix bug where Enter key didn't work on messages list in "List" layout (#7052) - Fix bug where deleting a saved search in addressbook caused display issue on sources/groups list (#7061) +- Fix bug where a new contact group added after removing all groups from addressbook wasn't added to the list RELEASE 1.4.1 ------------- diff --git a/program/js/treelist.js b/program/js/treelist.js index 21b22803c..7eef31c79 100644 --- a/program/js/treelist.js +++ b/program/js/treelist.js @@ -368,8 +368,14 @@ function rcube_treelist_widget(node, p) // insert as child of an existing node if (parent_node) { node.level = parent_node.level + 1; + if (!parent_node.children) parent_node.children = []; + else { + // Remove deleted nodes from the parent to make sure re-rendering below + // happens when adding a new child to a parent with all nodes removed + parent_node.children = parent_node.children.filter(function(node) { return !node.deleted; }); + } search_active = false; parent_node.children.push(node);