fix(VAutocomplete): fix scroll jump #22531#22665
Open
Kirubapanneers wants to merge 2 commits intovuetifyjs:masterfrom
Open
fix(VAutocomplete): fix scroll jump #22531#22665Kirubapanneers wants to merge 2 commits intovuetifyjs:masterfrom
Kirubapanneers wants to merge 2 commits intovuetifyjs:masterfrom
Conversation
Contributor
|
I have just took the demo from the original issue to play with it. Tab » Enter » Mouse Up/Down, reload Screencast.from.2026-03-01.15-16-53.webmLooks like an improvement (previously it jumped by hundreds). |
Author
|
Thanks for checking it out! I’ll look into the remaining issue and since this is my first opensource contribution, I really appreciate the feedback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #22531
The problem was that itemHeight dropped from 48px to 8.6px after render. That broke the offsets and made the scroll jump to the wrong place.
I fixed it by keeping the first measured itemHeight and not letting it change after that.
Changes
virtual.ts: prevent itemHeight from shrinking after initial measurement
virtual.ts: Reset scrollVelocity to 0 on first scroll after long pause
VAutocomplete.tsx: Fixed scroll timing when menu opens
Steps to reproduce fix