Fix hiding and event propagation issues with the user management popover

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-02-18 13:43:56 +01:00
parent a5b73fe761
commit fef3f23492
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 7 additions and 5 deletions

View File

@ -940,7 +940,7 @@ $(document).ready(function () {
UserList._triggerGroupEdit($td, isSubadminSelect);
});
$userListBody.on('click', '.toggleUserActions', function (event) {
$userListBody.on('click', '.toggleUserActions > .action', function (event) {
event.stopPropagation();
var $td = $(this).closest('td');
var $tr = $($td).closest('tr');
@ -963,9 +963,11 @@ $(document).ready(function () {
$tr.addClass('active');
});
$(document).on('mouseup', function () {
$('#userlist tr.active').removeClass('active');
$('#userlist .popovermenu.open').removeClass('open');
$(document).on('mouseup', function (event) {
if (!$(event.target).closest('.toggleUserActions').length) {
$('#userlist tr.active').removeClass('active');
$('#userlist .popovermenu.open').removeClass('open');
}
});
$userListBody.on('click', '.action-togglestate', function (event) {

View File

@ -67,7 +67,7 @@
<td class="userActions">
<div class="toggleUserActions">
<a class="action"><span class="icon-more"></span></a>
<div class="popovermenu bubble menu">
<div class="popovermenu">
<ul class="userActionsMenu">
<li>
<a href="#" class="menuitem action-togglestate permanent" data-action="togglestate"></a>