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 667d21ac7d
commit 014fa8c686
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>