mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user