Browse Source

Fix contacts menu not triggered on certain areas of a mention

The contacts menu was triggered only when the avatar or the name of the
user were clicked. Due to this, clicking on certain (small) areas of a
mention (like the right end, or the space between the avatar and the
name) did not show the contacts menu. Now the contacts menu is shown
when any area of the mention is clicked.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
tags/v15.0.0beta1
Daniel Calviño Sánchez 5 years ago
parent
commit
527d237289
1 changed files with 7 additions and 8 deletions
  1. 7
    8
      apps/comments/js/commentstabview.js

+ 7
- 8
apps/comments/js/commentstabview.js View File

@@ -442,14 +442,13 @@
return;
}

$el.find('.avatar').each(function() {
var avatar = $(this);
var strong = $(this).next();
var appendTo = $(this).parent();

var username = $(this).data('username');
if (username !== oc_current_user) {
$.merge(avatar, strong).contactsMenu(avatar.data('user'), 0, appendTo);
$el.find('.avatar-name-wrapper').each(function() {
var $this = $(this);
var $avatar = $this.find('.avatar');

var user = $avatar.data('user');
if (user !== OC.getCurrentUser().uid) {
$this.contactsMenu(user, 0, $this);
}
});
},

Loading…
Cancel
Save