Browse Source

Use setTimeout instead of listening for `animationend`

For some reason the latter causes extreme lag when switching rooms
JC Brand 6 years ago
parent
commit
a19e35d101
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/converse-message-view.js

+ 1 - 1
src/converse-message-view.js

@@ -142,7 +142,7 @@ converse.plugins.add('converse-message-view', {
 
             fadeOut () {
                 if (_converse.animate) {
-                    this.el.addEventListener('animationend', () => this.remove(), {'once': true});
+                    setTimeout(() => this.remove(), 600);
                     u.addClass('fade-out', this.el);
                 } else {
                     this.remove();