mirror of https://github.com/ElemeFE/element
check popper exist before invoke scrollIntoView
parent
6e685a3f02
commit
ce0da21067
|
@ -355,8 +355,10 @@
|
|||
},
|
||||
|
||||
scrollToOption(className = 'selected') {
|
||||
if (this.$refs.popper) {
|
||||
const menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
|
||||
scrollIntoView(menu, menu.getElementsByClassName(className)[0]);
|
||||
}
|
||||
},
|
||||
|
||||
handleMenuEnter() {
|
||||
|
|
Loading…
Reference in New Issue