CMS-18021 didn't completely fix the menu

Found in

EPiServer.CMS.UI 11.34.0

Fixed in

EPiServer.CMS.UI 11.35.1

(Or a related package)

Created

Mar 18, 2021

Updated

Apr 27, 2021

Area

CMS UI

State

Closed, Fixed and tested


Description

1. Add a menuItem like this.

using EPiServer.Shell.Navigation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;namespace EpiserverFull.Business.Rendering
{
    [MenuProvider]
    public class DropdownMenuProvider : IMenuProvider
    {
        const string DropdownMenuPath = MenuPaths.Global + "/customDropdownMenu";        
        public IEnumerable<MenuItem> GetMenuItems()
        {
            var menuItems = new List<MenuItem>();            
            var userMenu = new DropDownMenuItem("Episerver blogs", DropdownMenuPath)
            {
                SortIndex = SortIndex.Last - 20,
                Alignment = MenuItemAlignment.Right
            };
            menuItems.Add(userMenu);            
            menuItems.Add(new UrlMenuItem("CMS", DropdownMenuPath + "/item1",
                "https://world.episerver.com/blogs/?type=cmsblog&page=1")
            {
                SortIndex = 1,
            });            
            menuItems.Add(new UrlMenuItem("Commerce", DropdownMenuPath + "/item2",
                "https://world.episerver.com/blogs/?type=commerceblog&page=1")
            {
                SortIndex = 2,
            });            
            menuItems.Add(new UrlMenuItem("Find", DropdownMenuPath + "/item3",
                "https://world.episerver.com/blogs/?type=findblog&page=1")
            {
                SortIndex = 3,
            });            
            return menuItems;
        }
    }
}

2. Go to edit view to check.

Expected result:

The menu is not broken.

Actual result:

The menu is a little off if you check the images below: