diff --git a/src/app/ModuleBrowser.cpp b/src/app/ModuleBrowser.cpp index 5bf86314..3eec8ed1 100644 --- a/src/app/ModuleBrowser.cpp +++ b/src/app/ModuleBrowser.cpp @@ -247,8 +247,13 @@ struct BrowserSearchField : ui::TextField { void onSelectKey(const event::SelectKey &e) override { if (e.action == GLFW_PRESS) { if (e.key == GLFW_KEY_ESCAPE) { - BrowserOverlay *overlay = getAncestorOfType(); - overlay->hide(); + if (text != "") { + setText(""); + } + else { + BrowserOverlay *overlay = getAncestorOfType(); + overlay->hide(); + } e.consume(this); } }