mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	emoji picker: Use closest() to find map for mouseenter.
If we have two emoji pickers open for some reason, we will now no longer be buggy for the mouseenter event.
This commit is contained in:
		@@ -717,11 +717,11 @@ exports.register_click_handlers = function () {
 | 
			
		||||
        reset_emoji_showcase();
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $("body").on("mouseenter", ".emoji-popover-emoji", function () {
 | 
			
		||||
        const emoji_id = $(this).data("emoji-id");
 | 
			
		||||
    $("body").on("mouseenter", ".emoji-popover-emoji", function (e) {
 | 
			
		||||
        const emoji_id = $(e.currentTarget).data("emoji-id");
 | 
			
		||||
        const emoji_coordinates = get_emoji_coordinates(emoji_id);
 | 
			
		||||
 | 
			
		||||
        const $emoji_map = $(".emoji-popover-emoji-map");
 | 
			
		||||
        const $emoji_map = $(e.currentTarget).closest(".emoji-popover-emoji-map").expectOne();
 | 
			
		||||
        maybe_change_focused_emoji(
 | 
			
		||||
            $emoji_map,
 | 
			
		||||
            emoji_coordinates.section,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user