fix: overflow:hidden VOR Display-Wechsel und GridStack-Init setzen

Der Scroll zum Faktencheck wurde durch den display:none->flex Wechsel
und/oder GridStack-Init ausgeloest. overflow:hidden wird jetzt ganz
am Anfang von selectIncident gesetzt, BEVOR das incident-view
sichtbar wird. Erst 500ms nach Abschluss aller Render-Operationen
wird overflow wiederhergestellt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dieser Commit ist enthalten in:
claude-dev
2026-03-10 11:02:56 +01:00
Ursprung 163c0c1e8b
Commit d31ec2a9a8

Datei anzeigen

@@ -633,6 +633,10 @@ const App = {
this.currentIncidentId = id; this.currentIncidentId = id;
localStorage.setItem('selectedIncidentId', id); localStorage.setItem('selectedIncidentId', id);
// SR-Announcement // SR-Announcement
// Scroll komplett blockieren bevor irgendetwas gerendert wird
var mc = document.getElementById("main-content");
mc.style.overflow = "hidden";
mc.scrollTop = 0;
const inc = this.incidents.find(i => i.id === id); const inc = this.incidents.find(i => i.id === id);
if (inc) this._announceForSR('Lage ausgewählt: ' + inc.title); if (inc) this._announceForSR('Lage ausgewählt: ' + inc.title);
this.renderSidebar(); this.renderSidebar();
@@ -652,13 +656,13 @@ const App = {
UI.hideProgress(); UI.hideProgress();
} }
// Scroll auf 0 erzwingen waehrend Rendering + GridStack-Resize
var mc = document.getElementById("main-content");
var lockScroll = () => { mc.scrollTop = 0; };
mc.addEventListener("scroll", lockScroll);
mc.scrollTop = 0; mc.scrollTop = 0;
await this.loadIncidentDetail(id); await this.loadIncidentDetail(id);
setTimeout(() => { mc.removeEventListener("scroll", lockScroll); mc.scrollTop = 0; }, 500); mc.scrollTop = 0;
setTimeout(() => { mc.scrollTop = 0; mc.style.overflow = ""; }, 500);
}, },
async loadIncidentDetail(id) { async loadIncidentDetail(id) {