mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		@@ -95,7 +95,8 @@ function make_image_stubber() {
 | 
			
		||||
run_test('sender_hover', () => {
 | 
			
		||||
    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 = {
 | 
			
		||||
        stopPropagation: noop,
 | 
			
		||||
    };
 | 
			
		||||
 
 | 
			
		||||
@@ -651,17 +651,13 @@ exports.register_click_handlers = function () {
 | 
			
		||||
        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");
 | 
			
		||||
        e.stopPropagation();
 | 
			
		||||
        var message = current_msg_list.get(rows.id(row));
 | 
			
		||||
        var user = people.get_person_from_user_id(message.sender_id);
 | 
			
		||||
 | 
			
		||||
        // For /me says hi, the avatar and sender-name have individual
 | 
			
		||||
        // 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);
 | 
			
		||||
        show_user_info_popover(this, user, message);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $("#main_div").on("click", ".user-mention", function (e) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user