Skip to content

Commit

Permalink
fix(VSelect): don't update scroll position if menu is closed
Browse files Browse the repository at this point in the history
fixes #17085
  • Loading branch information
KaelWD committed Jul 20, 2023
1 parent fba94ca commit c53b2f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vuetify/src/components/VSelect/VSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,10 @@ export default baseMixins.extend<options>().extend({
},
onScroll () {
if (!this.isMenuActive) {
requestAnimationFrame(() => (this.getContent().scrollTop = 0))
requestAnimationFrame(() => {
const content = this.getContent()
if (content) content.scrollTop = 0
})
} else {
if (this.lastItem > this.computedItems.length) return

Expand Down

0 comments on commit c53b2f8

Please sign in to comment.