Slight tweak to userlist dropdown hiding

This commit is contained in:
calzoneman 2013-10-16 23:10:59 -05:00
parent 033fbbf08a
commit f8fcc0d2d7
2 changed files with 13 additions and 0 deletions

View file

@ -257,6 +257,14 @@ function addUserDropdown(entry, data) {
entry.contextmenu(function(ev) {
ev.preventDefault();
if(menu.css("display") == "none") {
$(".user-dropdown").hide();
$(document).bind("mouseup.userlist-ddown", function (e) {
if (menu.has(e.target).length === 0 &&
entry.parent().has(e.target).length === 0) {
menu.hide();
$(document).unbind("mouseup.userlist-ddown");
}
});
menu.show();
} else {
menu.hide();