paliari / v-autocomplete

Autocomplete component for Vue.js
351 stars 124 forks source link

Scroll in browser. #70

Open arpitpsm1 opened 6 years ago

arpitpsm1 commented 6 years ago

When I press Up OR Down arrow browser gets scroll to selected item in list. I do not know this is feature or not. But if we can handle this it will better.

Ephs05msm commented 5 years ago

Looks like the behavior is handled here: https://github.com/paliari/v-autocomplete/blob/master/src/Autocomplete.vue#L122.

It's a jarring effect in many cases. An option to disable this would be helpful. Thoughts?

@paliari, if you need help I'm happy to open a PR for this. I see a number of PRs open for months so I'm wondering where this stands. Thanks.

Flaburgan commented 4 years ago

On my project, when an item is focused with the keyboard, the screen scrolls to align it at the bottom. I personally find this very weird and indeed, a fix would be very nice.

PeterSchuhmannNetflow commented 1 year ago

Since there is no option to deactivate that feature the only option i see to disable it from the outside will be to override the intoView function of the item, like this:

HTMLElement.prototype.scrollIntoView = function() {};

Side effect: this will disable the function entirely that means it does not work for other items on your page.

In my case the autocomplete component will only be triggered on one page therefor i can accept that.