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->wrapValue(), | ||||||
| 			_controller->searchEnabledByContent(), | 			_controller->searchEnabledByContent(), | ||||||
| 			(_1 == Wrap::Layer) && _2 | 			(_1 == Wrap::Layer) && _2 | ||||||
|  | 		) | rpl::distinct_until_changed( | ||||||
| 		) | rpl::start_with_next([this](bool shown) { | 		) | rpl::start_with_next([this](bool shown) { | ||||||
| 			refreshSearchField(shown); | 			refreshSearchField(shown); | ||||||
| 		}, lifetime()); | 		}, lifetime()); | ||||||
|  | @ -257,7 +258,9 @@ void ContentWidget::refreshSearchField(bool shown) { | ||||||
| 		_searchField->setFocus(); | 		_searchField->setFocus(); | ||||||
| 		setScrollTopSkip(view->heightNoMargins() - st::lineWidth); | 		setScrollTopSkip(view->heightNoMargins() - st::lineWidth); | ||||||
| 	} else { | 	} else { | ||||||
|  | 		if (Ui::InFocusChain(this)) { | ||||||
| 			setFocus(); | 			setFocus(); | ||||||
|  | 		} | ||||||
| 		_searchWrap = nullptr; | 		_searchWrap = nullptr; | ||||||
| 		setScrollTopSkip(0); | 		setScrollTopSkip(0); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 John Preston
						John Preston