Mar 19, 2015, 2:54 AM
[CLOSED] Menu not collapsing
Curious as to why the menu is not collapsing when I move off of it? Here are the steps that I am performing.
Side Question: Is it normal for the sub-menu to display with a slight delay when selecting a main menu item or am I missing an option?
- Move the mouse over Menu 1. This causes the sub-menu to expand. (GOOD)
- Move the mouse to the right over Menu 2. This causes Menu 1 (plus the sub-menu) to disappear, and Menu 2 and its sub-menu to expand. (GOOD)
- Move the mouse up off of Menu 2. This causes Menu 2 (plus the sub-menu) to disappear. (GOOD)
----- - Move the mouse over Menu 1. This causes the sub-menu to expand. (GOOD)
- Move the mouse down off of Menu 1 into the panel. Menu 1 (plus the sub-menu) are still expanded (WHY?)
- Click on the panel. This causes Menu 1 (plus the sub-menu) to disappear. (OK)
----- - Move the mouse over Menu 1. This causes the sub-menu to expand. (GOOD)
- Move the mouse down to Menu 1.2 and select it. This causes the sub-menu to disappear, but Menu 1 is still active. (WHY?)
Side Question: Is it normal for the sub-menu to display with a slight delay when selecting a main menu item or am I missing an option?
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Menu Question</title>
<style type="text/css">
/* Menu body */
.wsMenu .x-menu-body {
background-color: #DEDEDE !important;
background-color: #B9CDE5 !important;
border: 0;
}
/* Menu items */
.wsMenu .x-menu-item-link {
padding-left: 6px;
padding-right: 30px;
line-height: 18px;
font-weight: bold;
}
/* Menu mouseover item */
.wsMenu .x-menu-item-active {
border: 0 !important;
}
/* Menu mouseover item */
.wsMenu .x-menu-item-active .x-menu-item-link {
background-color: #FFFFFF !important;
background-image: none;
}
/* Menu mouseover text */
.wsMenu .x-menu-item-active .x-menu-item-text {
color: #B22222 !important;
}
/* Menu arrow */
.wsMenu .x-menu-item-arrow {
display: none;
}
/* SubMenu body */
.wsSubMenu .x-menu-body {
background-color: #FFFFFF !important;
border: 0;
}
/* SubMenu items */
.wsSubMenu .x-menu-item-link {
padding-left: 11px;
line-height: 16px;
font-weight: bold;
display: block;
background-color: #FFFFFF !important;
}
/* SubMenu mouseover item */
.wsSubMenu .x-menu-item-active {
border: 0 !important;
}
/* SubMenu mouseover item */
.wsSubMenu .x-menu-item-active .x-menu-item-link {
background-color: #DEDEDE !important;
}
/* SubMenu mouseover text */
.wsSubMenu .x-menu-item-active .x-menu-item-text {
color: #B22222 !important;
background-image: none;
}
</style>
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:Window runat="server" Width="600" Height="150" Title="Menu Question">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch" DefaultMargins="2 0" />
</LayoutConfig>
<Items>
<ext:Panel runat="server" Header="false" Border="false" Height="23" Flex="1">
<Items>
<ext:Menu ID="wsMainMenu" runat="server" Floating="false" Layout="HBoxLayout" ShowSeparator="false"
Cls="wsMenu" Border="false">
<Defaults>
<ext:Parameter Name="MenuAlign" Value="tl-bl?" Mode="Value" />
</Defaults>
<Items>
<ext:MenuItem runat="server" Text="Menu 1">
<Menu>
<ext:Menu runat="server" Cls="wsSubMenu">
<Items>
<ext:MenuItem runat="server" Text="Menu 1.1"></ext:MenuItem>
<ext:MenuItem runat="server" Text="Menu 1.2"></ext:MenuItem>
<ext:MenuItem runat="server" Text="Menu 1.3"></ext:MenuItem>
</Items>
</ext:Menu>
</Menu>
</ext:MenuItem>
<ext:MenuItem runat="server" Text="Menu 2">
<Menu>
<ext:Menu runat="server" Cls="wsSubMenu">
<Items>
<ext:MenuItem runat="server" Text="Menu 2.1"></ext:MenuItem>
<ext:MenuItem runat="server" Text="Menu 2.2"></ext:MenuItem>
<ext:MenuItem runat="server" Text="Menu 2.3"></ext:MenuItem>
</Items>
</ext:Menu>
</Menu>
</ext:MenuItem>
</Items>
</ext:Menu>
</Items>
</ext:Panel>
</Items>
</ext:Window>
</body>
</html>
Last edited by Daniil; Mar 27, 2015 at 9:28 PM.
Reason: [CLOSED]