Element UI version
2.15.1
OS/Browsers version
macOS Big Sur 11.2.3 /chrome 版本 89.0.4389.114(正式版本) (x86_64)
Vue version
2.6.12
Reproduction Link
Steps to reproduce
When the keyboard selects down to the bottom of the scroll bar, and then selects up to the last visible element, it will scroll down the height of an element to display the previous element. However, if the keyboard does not select the bottom down, it will not scroll down the height of an element to display the previous element. Is the judgment of offsettop < scrolltop in the highlight method of the source code inaccurate?
What is Expected?
The interaction between the two is consistent?
What is actually happening?
The interaction between the two is not consistent
3条答案
按热度按时间sg3maiej1#
Translation of this issue:
Element UI version
2.15.1
OS/Browsers version
MacOS Big Sur 11.2.3 / Chrome version 89.0.4389.114 (official version) (x86)_ 64)
Vue version
2.6.12
Reproduction Link
https://codepen.io/pen/
Steps to reproduce
When the keyboard selects down to the bottom of the scroll bar, and then selects up to the last visible element, it will scroll down the height of an element to display the previous element. However, if the keyboard does not select the bottom down, it will not scroll down the height of an element to display the previous element. Is the judgment of offsettop < scrolltop in the highlight method of the source code inaccurate?
What is Expected?
The interaction between the two is consistent?
What is actually happening?
The interaction between the two is not consistent
jhdbpxl92#
我可能很难描述这个问题,组件官网demo中的带输入建议的autocomplete组件可以复现这个问题。
复现步骤:
1、点击下拉框出现下拉选项,按键盘上的下键一直选到底部的选项(南拳妈妈龙虾盖浇饭)。然后再按上键并在即将选中樱花食堂(凌空店)这一项时,会将四海游龙(天山西路店)这一项显示出来。总结的效果就是向上选中可视选项中的最后一项时(例如樱花食堂(凌空店)这一项),会将这一项的前一条下拉数据项显示出来。
2、点击下拉框出现下拉选项,按键盘上的下键一直选到出现滚动即可(例如选到唦哇嘀咖为止)。此时再按上键往上选中可视选项中的最后一项时(例如Merci Paul cafe这一项),不会将这一项的前一条下拉数据项显示出来。
总结:按下键选到底部再按上键往上选时会有1的效果。按下键没有选到底部再按上键往上选时会出现2这种效果,跟1的效果不一样
hyrbngr73#
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.