Показывать ошибку после восстановления истории (#9)
deploy-preland / deploy zoomstage.online (push) Successful in 36s

This commit is contained in:
Panfilov Konstantin committed 2026-10-20 18:52:35 +03:00
1 parent 6a2532cb87
commit 75ccf14889
1 file changed
+6 -2
+6 -2
View File
@@ -305,12 +305,16 @@ $basePickerAccept = 'image/jpeg,image/png,image/gif,image/webp,image/bmp,image/a
uploadAttempt++;
if (!keepRecovery) clearRecovery();
resetUploadPending();
window.PublicNavigationGuard.allowNavigation();
form.show();
if (typeof preview !== 'undefined' && preview) {
preview.show(); preview.showError(msg);
preview.el.scrollIntoView({block: 'nearest'});
if (!preview.sourceEl.getAttribute('src')) preview.sourceEl.style.display = 'none';
}
// Release sentinel восстанавливает scroll history. Показываем сообщение
// после этого перехода, иначе браузер тут же возвращает верх страницы.
window.PublicNavigationGuard.allowNavigation(() => requestAnimationFrame(() => {
if (typeof preview !== 'undefined' && preview) preview.upscaleErrorOverlay.scrollIntoView({block: 'center', behavior: 'instant'});
}));
fileInput.value = '';
}
window.addEventListener('pagehide', () => { leavingUploadPage = true; });