diff --git a/src/gui/html/js/events.js b/src/gui/html/js/events.js index 7684b933..2f4441d6 100644 --- a/src/gui/html/js/events.js +++ b/src/gui/html/js/events.js @@ -41,10 +41,6 @@ function onChangeGame(evt) { const gameInfo = JSON.parse(result, loot.Plugin.fromJson); loot.game = new loot.Game(gameInfo, loot.l10n); - /* Reset virtual list positions. */ - document.getElementById('cardsNav').scrollToIndex(0); - document.getElementById('pluginCardList').scrollToIndex(0); - /* Now update virtual lists. */ filterPluginData(loot.game.plugins, loot.filters); diff --git a/src/gui/html/js/helpers.js b/src/gui/html/js/helpers.js index c32995d0..b5bf1e07 100644 --- a/src/gui/html/js/helpers.js +++ b/src/gui/html/js/helpers.js @@ -54,6 +54,7 @@ function filterPluginData(plugins, filters) { } } document.getElementById('cardsNav').notifyResize(); + document.getElementById('pluginCardList').notifyResize(); /* Now perform search again. If there is no current search, this won't do anything. */