Try cancelling the new search by mouse back button.

This commit is contained in:
John Preston
2024-04-24 17:41:12 +04:00
parent 72d5a9b3e0
commit d5a347ede7
3 changed files with 10 additions and 1 deletions
@@ -1107,6 +1107,13 @@ void Widget::updateHasFocus(not_null<QWidget*> focused) {
}
}
bool Widget::cancelSearchByMouseBack() {
return _searchHasFocus
&& !_searchSuggestionsLocked
&& !_searchInChat
&& cancelSearch();
}
void Widget::processSearchFocusChange() {
_searchSuggestionsLocked = _suggestions && _suggestions->persist();
updateCancelSearch();