sagalbot / vue-select

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.
https://vue-select.org
MIT License
4.62k stars 1.33k forks source link

Mouse and keyboard scroll inconsistencies when list-header slot is present #1644

Open timbarclay opened 2 years ago

timbarclay commented 2 years ago

Describe the bug When the list-header slot is used, some odd mouse and keyboard scroll behaviours emerge:

Reproduction Link https://codepen.io/timbarclay/pen/QWQVpYw

Steps To Reproduce Mouse scroll bug:

  1. Open codepen above
  2. Click into the first v-select box and type "vue"
  3. When results have loaded, use the mouse wheel to scroll halfway down the list
  4. Move your mouse to try to click the option that is at the top of the currently visible set of options
  5. Note that instead of allowing you to select that top option, it scrolls right back to the first option in the list

Keyboard navigation bug:

  1. Open codepen above
  2. Click into the first v-select box and type "vue"
  3. Press the down key five times
  4. Note that the highlighted option (the fifth on the list) is not visible

Expected behavior For both sets of steps above, repeat them on the second v-select box at the codepen (which doesn't use the list-header slot) and note that the bugs don't occur.

altinialiu57 commented 2 years ago

try adding :autoscroll="false"