Fix scroll-to-top on note toggle during playback
pattern_updated SSE was calling render_content() which rebuilds the entire panel DOM, resetting the scroll position. Since toggle_note already calls render_step_grid() directly after the PUT, replace the SSE full-render with a grid-only refresh to preserve scroll. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -502,7 +502,8 @@ es.addEventListener('pattern_updated', (e) => {
|
||||
const p = JSON.parse(e.data);
|
||||
state.patterns.set(p.id, p);
|
||||
if (state.selected_id === p.id) {
|
||||
render_content();
|
||||
/* Only refresh the grid — full render_content() resets scroll position */
|
||||
render_step_grid(p, p.notes);
|
||||
}
|
||||
render_pattern_list();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user