mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Fix message field focus loss in Saved Messages.
This commit is contained in:
parent
7f66e0fdfe
commit
01821c30e5
1 changed files with 4 additions and 1 deletions
|
@ -66,6 +66,7 @@ ContentWidget::ContentWidget(
|
|||
_controller->wrapValue(),
|
||||
_controller->searchEnabledByContent(),
|
||||
(_1 == Wrap::Layer) && _2
|
||||
) | rpl::distinct_until_changed(
|
||||
) | rpl::start_with_next([this](bool shown) {
|
||||
refreshSearchField(shown);
|
||||
}, lifetime());
|
||||
|
@ -257,7 +258,9 @@ void ContentWidget::refreshSearchField(bool shown) {
|
|||
_searchField->setFocus();
|
||||
setScrollTopSkip(view->heightNoMargins() - st::lineWidth);
|
||||
} else {
|
||||
setFocus();
|
||||
if (Ui::InFocusChain(this)) {
|
||||
setFocus();
|
||||
}
|
||||
_searchWrap = nullptr;
|
||||
setScrollTopSkip(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue