Fix scrollTop of undefined in CannedResponseList (#226)

This commit is contained in:
Pranav Raj S 2019-11-20 15:40:34 +05:30 committed by GitHub
parent aef3b04aa5
commit 8348f4adae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,8 +75,7 @@ export default {
if (this.isEnter(e)) {
this.onKeyenter(this.cannedMessages[this.selectedIndex].content);
}
this.$el.querySelector('#canned-list').scrollTop =
34 * this.selectedIndex;
this.$el.scrollTop = 34 * this.selectedIndex;
},
onHover(index) {
this.selectedIndex = index;