diff --git a/src/app/ui/skin/skin_theme.cpp b/src/app/ui/skin/skin_theme.cpp index b297044c6..95f194288 100644 --- a/src/app/ui/skin/skin_theme.cpp +++ b/src/app/ui/skin/skin_theme.cpp @@ -80,14 +80,16 @@ protected: return true; case kKeyDownMessage: - if (static_cast(msg)->scancode() == kKeyEsc) { + if (getRoot()->isForeground() && + static_cast(msg)->scancode() == kKeyEsc) { setSelected(true); return true; } break; case kKeyUpMessage: - if (static_cast(msg)->scancode() == kKeyEsc) { + if (getRoot()->isForeground() && + static_cast(msg)->scancode() == kKeyEsc) { if (isSelected()) { setSelected(false); closeWindow();