Make event listneres passive.
This commit is contained in:
parent
c9f5e06ee4
commit
f4b4cfdee2
@ -136,8 +136,8 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.scrolledToBottom = true;
|
this.scrolledToBottom = true;
|
||||||
window.addEventListener("resize", debounce(this.handleResize, 50));
|
window.addEventListener("resize", debounce(this.handleResize, 50), {passive: true});
|
||||||
this.$refs.chat.addEventListener("scroll", debounce(this.handleScroll, 50));
|
this.$refs.chat.addEventListener("scroll", debounce(this.handleScroll, 50), {passive: true});
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.historyObserver) {
|
if (this.historyObserver) {
|
||||||
this.historyObserver.observe(this.$refs.loadMoreButton);
|
this.historyObserver.observe(this.$refs.loadMoreButton);
|
||||||
|
Loading…
Reference in New Issue
Block a user