Commit ce0da210 authored by 孙志东's avatar 孙志东 Committed by 杨奕

check popper exist before invoke scrollIntoView

parent 6e685a3f
...@@ -355,8 +355,10 @@ ...@@ -355,8 +355,10 @@
}, },
scrollToOption(className = 'selected') { scrollToOption(className = 'selected') {
if (this.$refs.popper) {
const menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap'); const menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
scrollIntoView(menu, menu.getElementsByClassName(className)[0]); scrollIntoView(menu, menu.getElementsByClassName(className)[0]);
}
}, },
handleMenuEnter() { handleMenuEnter() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment