Preserve install page scroll position
Some checks failed
Build / release (macos-latest) (push) Has been cancelled
Build / release (ubuntu-latest) (push) Has been cancelled
Build / release (windows-latest) (push) Has been cancelled
Windows Smoke Test / windows-smoke (push) Has been cancelled

This commit is contained in:
2026-05-05 17:45:41 +09:00
parent 66a9aec7d4
commit 9251fabdf8

View File

@@ -4,6 +4,7 @@ const ConfigManager = require('./assets/js/configmanager')
const ProfileAssetManager = require('./assets/js/profileassetmanager')
const installCatalogList = document.getElementById('installCatalogList')
const installPageShell = document.querySelector('#installContainer .launcherPageShell')
let expandedProfileId = null
@@ -187,6 +188,7 @@ function createExpandedDetail(profile, installed){
}
async function renderInstallView(){
const previousScrollTop = installPageShell != null ? installPageShell.scrollTop : 0
installCatalogList.innerHTML = ''
try {
@@ -314,6 +316,12 @@ async function renderInstallView(){
errorCard.className = 'launcherCard'
errorCard.innerHTML = '<h3 class="launcherCardTitle">카탈로그 로드 실패</h3><p class="launcherCardDescription">관리자가 등록한 카탈로그를 읽지 못했습니다.</p>'
installCatalogList.appendChild(errorCard)
} finally {
if(installPageShell != null){
requestAnimationFrame(() => {
installPageShell.scrollTop = previousScrollTop
})
}
}
}