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
The Enter event seems to be incorrectly firing while context menus are open. Here is an app that demos the problem (see below). It is most apparent when resizing. Although I have also seen Enter events fired at other times when a context menu is opened (I first noticed it in TerminalGuiDesigner), in that case I think Enter was firing when the submenu popped.
Expected behavior
While a context menu is open no Enter events should be raised unless they are directly registered on the context menu itself.
usingTerminal.Gui;Application.Init();Application.Top.ColorScheme=Colors.Base;// for logging outputvarevents=newTextView{ReadOnly=true,X=50,Y=1,Width=Dim.Fill(),Height=Dim.Fill(),Text="Events:"};// a root viewvarroot=newView(){Width=Dim.Fill(),Height=Dim.Fill(),ColorScheme=Colors.Base};root.Enter+=(s)=>{events.Text+=$"\nEntered root";};root.Add(events);// with a label (that is focusable)varlbl=newLabel("Name:"){Y=0,CanFocus=true};lbl.Enter+=(s)=>events.Text+=$"\nEntered Label";root.Add(lbl);// and a text fieldvartf=newTextField(){X=Pos.Right(lbl)+1,Width=10};tf.Enter+=(s)=>events.Text+=$"\nEntered TextField";root.Add(tf);Application.Top.Add(root);Application.Run();
Resizing when context menu is open causes misfiring Enter events
The text was updated successfully, but these errors were encountered:
Describe the bug
The
Enter
event seems to be incorrectly firing while context menus are open. Here is an app that demos the problem (see below). It is most apparent when resizing. Although I have also seen Enter events fired at other times when a context menu is opened (I first noticed it in TerminalGuiDesigner), in that case I thinkEnter
was firing when the submenu popped.Expected behavior
While a context menu is open no Enter events should be raised unless they are directly registered on the context menu itself.
Resizing when context menu is open causes misfiring Enter events
The text was updated successfully, but these errors were encountered: