Explorar o código

Use setTimeout instead of listening for `animationend`

For some reason the latter causes extreme lag when switching rooms
JC Brand %!s(int64=6) %!d(string=hai) anos
pai
achega
a19e35d101
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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();