Fix LOOT scrolling to first plugin card on init

Some of this fix is in iron-list's merged
fix-resize-external-scroll-target branch.

LOOT's JS code changes prevent changing game from not updating the
plugin cards after changing game until the window is resized.
This commit is contained in:
Oliver Hamlet
2016-05-13 06:51:45 +01:00
parent 0fc06b6625
commit 20f2cad25c
2 changed files with 1 additions and 4 deletions
-4
View File
@@ -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);
+1
View File
@@ -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. */