Skip to content

Commit

Permalink
Fix scroll behavior of scrollable typeahead
Browse files Browse the repository at this point in the history
Before it would sometimes also scroll the entire page.

See: https://stackoverflow.com/a/52835382/1796523
  • Loading branch information
mzur committed Nov 5, 2024
1 parent 363eeb8 commit 9290905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/assets/js/core/components/typeahead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default {
},
handleArrowKeyScroll(index) {
if (this.scrollable && this.$refs.dropdown[index]) {
this.$refs.dropdown[index].$el.scrollIntoView(true);
this.$refs.dropdown[index].$el.scrollIntoView({block: 'nearest'});
}
},
},
Expand Down

0 comments on commit 9290905

Please sign in to comment.