From e230036354269ac638521fed90cba3f6e77aff1c Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 13 Oct 2011 21:52:59 -0400 Subject: fixed bug where a removed user could not be added again in userpicker --- js/lib/userpicker.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/lib/userpicker.js b/js/lib/userpicker.js index ece5a6951..f2c2aa53f 100644 --- a/js/lib/userpicker.js +++ b/js/lib/userpicker.js @@ -48,7 +48,12 @@ elgg.userpicker.addUser = function(event, ui) { } elgg.userpicker.removeUser = function(event) { - $(this).closest('.elgg-user-picker-list > li').remove(); + var item = $(this).closest('.elgg-user-picker-list > li'); + + var guid = item.find('[name="members[]"]').val(); + delete elgg.userpicker.userList[guid]; + + item.remove(); event.preventDefault(); } -- cgit v1.2.3