Browse Source

Try to work around a Chromium flexbox bug.

The .chat-content are doesn't resize when the textarea gets resized to
its original size once a message gets sent.
JC Brand 5 years ago
parent
commit
f367157d75
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/converse-chatview.js

+ 8 - 0
src/converse-chatview.js

@@ -814,9 +814,17 @@ converse.plugins.add('converse-chatview', {
                      */
                     _converse.api.trigger('messageSend', message);
                 }
+                const el = this.content.parentElement;
+                el.style.display = 'none';
+
                 textarea.removeAttribute('disabled');
                 u.removeClass('disabled', textarea);
                 textarea.focus();
+
+                // XXX: Chrome flex bug workaround. The .chat-content area
+                // doesn't resize when the textarea is resized to its original size.
+                el.style.display = '';
+
                 // Suppress events, otherwise superfluous CSN gets set
                 // immediately after the message, causing rate-limiting issues.
                 this.model.setChatState(_converse.ACTIVE, {'silent': true});