Fix stale restore after game restart

This commit is contained in:
2026-05-20 22:27:36 +02:00
parent 8258ea2321
commit beac5a2be3
12 changed files with 167 additions and 44 deletions
+13
View File
@@ -2335,6 +2335,19 @@ class UIDisplayHandlerModule extends BaseModule {
}
clear() {
this.renderWindowToken += 1;
this.scrollRequestId += 1;
if (this.scrollAnimationFrameId != null) {
cancelAnimationFrame(this.scrollAnimationFrameId);
this.scrollAnimationFrameId = null;
}
if (this.scrollAnimationResolve) {
this.scrollAnimationResolve();
this.scrollAnimationResolve = null;
this.scrollAnimationPromise = null;
}
this.storyScrollAnimation = null;
if (document.documentElement.dataset.skippablePause === 'true') {
document.dispatchEvent(new CustomEvent('ui:command', {
detail: { moduleId: this.id, type: 'continue', source: 'display-clear' }