Commit 06ab299
committed
fix(response): manually center active match horizontally on jump
scrollIntoView({ inline: 'center' }) wasn't centering the active match
inside the virtualized scroll container — the combination of
contain:strict on the parent and the absolute-positioned inner slab
made it unreliable across match hops.
Replace it with an explicit computation: read the mark's bounding rect,
project it into the parent's scrollable content space, and set
parent.scrollLeft = center - clientWidth/2. Also drop the smooth
behaviour on virtualizer.scrollToIndex so the row is at its final
position by the time we measure in the next frame.1 parent 55224f7 commit 06ab299
1 file changed
Lines changed: 19 additions & 12 deletions
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
572 | | - | |
573 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
574 | 576 | | |
575 | 577 | | |
576 | | - | |
| 578 | + | |
577 | 579 | | |
578 | 580 | | |
579 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
580 | 584 | | |
581 | 585 | | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
589 | 596 | | |
590 | 597 | | |
591 | 598 | | |
| |||
0 commit comments