mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 02:10:09 +08:00
Search: dont adjust height if not rendered
This commit is contained in:
parent
2924d44d15
commit
2183a7f879
|
@ -114,6 +114,9 @@ export default class Search extends Component {
|
|||
// Highlight the item that is currently selected.
|
||||
this.setIndex(this.getCurrentNumericIndex());
|
||||
|
||||
// If there are no sources, the search view is not shown.
|
||||
if (!this.sources.length) return;
|
||||
|
||||
// Since extensions might add elements above the search box on mobile,
|
||||
// we need to calculate and set the max height dynamically.
|
||||
const resultsElementMargin = 14;
|
||||
|
|
Loading…
Reference in New Issue
Block a user