Repository navigation
Commit ef88f2f
fix active tab hidden in the tab strip's horizontal overflow
render() rebuilds #tab-list with innerHTML = '', which clamps scrollLeft back
to 0, so with enough tabs to overflow the strip the active one silently landed
off-screen — most visibly right after clicking a project, since setActiveProject
emits project-changed and the tab bar re-renders on it.
Capture the offset before the wipe, restore it after the rebuild, then scroll
the active tab into view. Restoring it is what keeps unrelated re-renders
(unread transitions, share state, layout) from moving the strip at all: with
the offset back in place, inline: 'nearest' is a no-op while the tab is already
fully visible. The active element is captured in the existing append loop
rather than re-queried, since render() already computes isActive.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 23541c7 commit ef88f2f
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| 302 | + | |
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
| |||
409 | 412 | | |
410 | 413 | | |
411 | 414 | | |
| 415 | + | |
412 | 416 | | |
413 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
414 | 426 | | |
415 | 427 | | |
416 | 428 | | |
| |||
0 commit comments