From d8a0497a7e812e2badaa4f04b6f12322be875965 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 7 Nov 2022 14:11:50 +0400 Subject: [PATCH] Don't jump with focus to chats list. --- Telegram/SourceFiles/history/history_widget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index a846d6181..4c1181288 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -2086,7 +2086,7 @@ void HistoryWidget::showHistory( _cornerButtons.clearReplyReturns(); if (_history) { - if (Ui::InFocusChain(_list)) { + if (Ui::InFocusChain(this)) { // Removing focus from list clears selected and updates top bar. setFocus(); } @@ -3670,6 +3670,10 @@ void HistoryWidget::saveEditMsg() { } void HistoryWidget::hideChildWidgets() { + if (Ui::InFocusChain(this)) { + // Removing focus from list clears selected and updates top bar. + setFocus(); + } if (_tabbedPanel) { _tabbedPanel->hideFast(); }