diff --git a/core/js/jquery.contactsmenu.js b/core/js/jquery.contactsmenu.js index 2c950fb35f..84f5a3f9ea 100644 --- a/core/js/jquery.contactsmenu.js +++ b/core/js/jquery.contactsmenu.js @@ -90,8 +90,8 @@ }); $(document).click(function(event) { - var clickedList = $.contains($list, event.target); - var clickedTarget = $.contains($div, event.target); + var clickedList = ($list.has(event.target).length > 0); + var clickedTarget = ($div.has(event.target).length > 0); $div.each(function() { if ($(this).is(event.target)) {