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>
This commit is contained in:
parent
6112adfe06
commit
527d237289
|
@ -442,14 +442,13 @@
|
|||
return;
|
||||
}
|
||||
|
||||
$el.find('.avatar').each(function() {
|
||||
var avatar = $(this);
|
||||
var strong = $(this).next();
|
||||
var appendTo = $(this).parent();
|
||||
$el.find('.avatar-name-wrapper').each(function() {
|
||||
var $this = $(this);
|
||||
var $avatar = $this.find('.avatar');
|
||||
|
||||
var username = $(this).data('username');
|
||||
if (username !== oc_current_user) {
|
||||
$.merge(avatar, strong).contactsMenu(avatar.data('user'), 0, appendTo);
|
||||
var user = $avatar.data('user');
|
||||
if (user !== OC.getCurrentUser().uid) {
|
||||
$this.contactsMenu(user, 0, $this);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue