mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-28 01:23:09 +00:00
Fix message field focus loss in Saved Messages.
This commit is contained in:
parent
7f66e0fdfe
commit
01821c30e5
@ -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…
Reference in New Issue
Block a user