Search: dont adjust height if not rendered

This commit is contained in:
Alexander Skvortsov 2021-03-08 22:45:39 -05:00
parent 2924d44d15
commit 2183a7f879

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;