1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 15:37:51 +02:00

Search: dont adjust height if not rendered

This commit is contained in:
Alexander Skvortsov
2021-03-08 22:45:39 -05:00
parent a2f52c09fd
commit b88a7cb33b

View File

@@ -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;