Make event listneres passive.

This commit is contained in:
Richard Lewis 2018-07-13 20:58:01 +03:00 committed by Pavel Djundik
parent c9f5e06ee4
commit f4b4cfdee2

View file

@ -136,8 +136,8 @@ export default {
},
mounted() {
this.scrolledToBottom = true;
window.addEventListener("resize", debounce(this.handleResize, 50));
this.$refs.chat.addEventListener("scroll", debounce(this.handleScroll, 50));
window.addEventListener("resize", debounce(this.handleResize, 50), {passive: true});
this.$refs.chat.addEventListener("scroll", debounce(this.handleScroll, 50), {passive: true});
this.$nextTick(() => {
if (this.historyObserver) {
this.historyObserver.observe(this.$refs.loadMoreButton);