Skip to content

Commit f838e4a

Browse files
author
Marvin Schürz
committed
Ignore keyobard input when not in focus
1 parent b6c24f0 commit f838e4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

osu.Framework/Graphics/UserInterface/TextArea.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ protected void ExpandSelectionVertically(int amount)
321321

322322
protected override bool OnKeyDown(KeyDownEvent e)
323323
{
324+
if (!HasFocus)
325+
return false;
326+
324327
switch (e.Key)
325328
{
326329
case Key.Up:
@@ -347,6 +350,9 @@ protected override bool OnKeyDown(KeyDownEvent e)
347350

348351
public bool OnPressed(KeyBindingPressEvent<PlatformAction> e)
349352
{
353+
if (!HasFocus)
354+
return false;
355+
350356
switch (e.Action)
351357
{
352358
case PlatformAction.SelectAll:

0 commit comments

Comments
 (0)