You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a view has a TabView and you open a right click context menu in root view then the left/right keypresses are taken first by the tab view.
To Reproduce
Right click to open context menu
Navigate up and down and into and out of context menu submenu
Expected not to see tab view steal keystrokes.
You often have to press Left twice e.g. to collapse submenu
Application.Init ();
var win = new Window ()
{
Title = "My Window",
X = 0,
Y = 0,
Width = Dim.Fill (),
Height = Dim.Fill ()
};
// Tab View
var tabView = new TabView ()
{
X = 1,
Y = 1,
Width = Dim.Fill () - 2,
Height = Dim.Fill () - 2
};
tabView.AddTab (new Tab (){DisplayText = "Tab 1" }, true);
tabView.AddTab (new Tab (){DisplayText = "Tab 2"}, false);
win.Add (tabView);
// Context Menu
var contextMenu = new ContextMenu ();
var menu =
new MenuBarItem (
new MenuItem []
{
new MenuItem ("Item 1", "First item", () => MessageBox.Query ("Action", "Item 1 Clicked", "OK")),
new MenuBarItem (
"Submenu",
new List<MenuItem []>
{
new MenuItem []
{
new MenuItem (
"Sub Item 1",
"Submenu item",
() =>
{
MessageBox.Query ("Action", "Sub Item 1 Clicked", "OK");
})
}
})
});
win.MouseClick += (s,e) =>
{
if (e.Flags.HasFlag (MouseFlags.Button3Clicked)) // Right-click
{
contextMenu.Position = e.Position;
contextMenu.Show (menu);
}
};
Application.Run (win);
Application.Shutdown ();
Expected behavior
While context menu is open the tab view should not be getting key presses.
Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
When a view has a TabView and you open a right click context menu in root view then the left/right keypresses are taken first by the tab view.
To Reproduce
Expected not to see tab view steal keystrokes.
You often have to press Left twice e.g. to collapse submenu
Expected behavior
While context menu is open the tab view should not be getting key presses.
Screenshots
The text was updated successfully, but these errors were encountered: