From 614237fc2e600717cae3df1dfcf194e6201631c9 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Tue, 14 Jul 2020 16:18:16 +0300 Subject: [PATCH] Clear forward query on Esc --- Telegram/SourceFiles/boxes/share_box.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/boxes/share_box.cpp b/Telegram/SourceFiles/boxes/share_box.cpp index 475368d6a..0b44b21de 100644 --- a/Telegram/SourceFiles/boxes/share_box.cpp +++ b/Telegram/SourceFiles/boxes/share_box.cpp @@ -426,6 +426,8 @@ void ShareBox::keyPressEvent(QKeyEvent *e) { _inner->activateSkipPage(contentHeight(), -1); } else if (e->key() == Qt::Key_PageDown) { _inner->activateSkipPage(contentHeight(), 1); + } else if (e->key() == Qt::Key_Escape && !_select->getQuery().isEmpty()) { + _select->clearQuery(); } else { BoxContent::keyPressEvent(e); }