You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Window virtualizer initialOffset default uses the axis from creation (Lit, Svelte) #1390
Follow-up from #1383. In Lit and Svelte the window virtualizer builds its default initialOffset callback once, so it keeps reading options.horizontal from creation. Core reads initialOffset again after enabled: false, so if horizontal changes while the list is disabled, the virtualizer starts from the wrong axis (scrollX vs scrollY). It can then write that offset to the page.
Rare case, and main had the same thing in the other direction before #1383.
Idea from @Ishkirat-Singh: core calls initialOffset(this) and the window adapters read instance.options.horizontal. Existing callbacks with no arguments still work, but it changes the public type in core. The test should change the axis while the list is disabled, with different scrollX and scrollY values, then enable the list again. It should also check that an explicit initialOffset still wins.
@Ishkirat-Singh are you planning to pick this up? I have a small fix ready for the initialOffset(this) approach, with tests for core, Lit and Svelte. If you'd rather do it, I'll leave it to you.
Activity
harrismalik commentedon Nov 23, 2026
@Ishkirat-Singh are you planning to pick this up? I have a small fix ready for the
initialOffset(this)approach, with tests for core, Lit and Svelte. If you'd rather do it, I'll leave it to you.piecyk commentedon Nov 23, 2026
@harrismalik feel free to pick it up!