2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Just focus the search field on Space.

This commit is contained in:
John Preston
2024-05-01 12:57:47 +04:00
parent 9166a1c3a6
commit 32483fa13b

View File

@@ -3270,7 +3270,9 @@ void Widget::keyPressEvent(QKeyEvent *e) {
// query while still show _suggestions animated, if it is a space.
_postponeProcessSearchFocusChange = true;
_search->setFocusFast();
QCoreApplication::sendEvent(_search->rawTextEdit(), e);
if (e->key() != Qt::Key_Space) {
QCoreApplication::sendEvent(_search->rawTextEdit(), e);
}
_postponeProcessSearchFocusChange = false;
processSearchFocusChange();
} else {