mirror of https://github.com/zulip/zulip.git
user popover: Pop user menu closer to avatar.
If you click on the avatar, we now show the menu right next to the avatar. The current behavior is particularly funny for long names. (I confirmed this with Rishi.)
This commit is contained in:
parent
fb750a2656
commit
725bdcc384
|
@ -95,7 +95,8 @@ function make_image_stubber() {
|
||||||
run_test('sender_hover', () => {
|
run_test('sender_hover', () => {
|
||||||
popovers.register_click_handlers();
|
popovers.register_click_handlers();
|
||||||
|
|
||||||
var handler = $('#main_div').get_on_handler('click', '.sender_info_hover');
|
var selection = ".sender_name, .sender_name-in-status, .inline_profile_picture";
|
||||||
|
var handler = $('#main_div').get_on_handler('click', selection);
|
||||||
var e = {
|
var e = {
|
||||||
stopPropagation: noop,
|
stopPropagation: noop,
|
||||||
};
|
};
|
||||||
|
|
|
@ -651,17 +651,13 @@ exports.register_click_handlers = function () {
|
||||||
popovers.toggle_actions_popover(this, rows.id(row));
|
popovers.toggle_actions_popover(this, rows.id(row));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#main_div").on("click", ".sender_info_hover", function (e) {
|
$("#main_div").on("click", ".sender_name, .sender_name-in-status, .inline_profile_picture", function (e) {
|
||||||
var row = $(this).closest(".message_row");
|
var row = $(this).closest(".message_row");
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var message = current_msg_list.get(rows.id(row));
|
var message = current_msg_list.get(rows.id(row));
|
||||||
var user = people.get_person_from_user_id(message.sender_id);
|
var user = people.get_person_from_user_id(message.sender_id);
|
||||||
|
|
||||||
// For /me says hi, the avatar and sender-name have individual
|
show_user_info_popover(this, user, message);
|
||||||
// sender_info_hover spans, and we the last one.
|
|
||||||
var elt = row.find('.sender_info_hover').last()[0];
|
|
||||||
|
|
||||||
show_user_info_popover(elt, user, message);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#main_div").on("click", ".user-mention", function (e) {
|
$("#main_div").on("click", ".user-mention", function (e) {
|
||||||
|
|
Loading…
Reference in New Issue