check popper exist before invoke scrollIntoView

pull/6345/head^2
孙志东 2017-07-28 12:08:03 +08:00 committed by 杨奕
parent 6e685a3f02
commit ce0da21067
1 changed files with 4 additions and 2 deletions

View File

@ -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() {