mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-29 09:18:01 +01:00
Only call the focused view.
This commit is contained in:
@@ -1139,7 +1139,7 @@ namespace Terminal.Gui {
|
||||
if (subviews == null || subviews.Count == 0)
|
||||
return false;
|
||||
foreach (var view in subviews)
|
||||
if (view.OnKeyDown (keyEvent))
|
||||
if (view.HasFocus && view.OnKeyDown (keyEvent))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -1160,7 +1160,7 @@ namespace Terminal.Gui {
|
||||
if (subviews == null || subviews.Count == 0)
|
||||
return false;
|
||||
foreach (var view in subviews)
|
||||
if (view.OnKeyUp (keyEvent))
|
||||
if (view.HasFocus && view.OnKeyUp (keyEvent))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user