Make sure that the textarea resizes back to original size

after sending
This commit is contained in:
JC Brand 2018-05-19 08:22:57 +02:00
parent fe8b257243
commit b939de03bc

View File

@ -885,6 +885,11 @@
} }
textarea.value = ''; textarea.value = '';
textarea.focus(); textarea.focus();
// Trigger input event, so that the textarea resizes
const event = document.createEvent('Event');
event.initEvent('input', true, true);
textarea.dispatchEvent(event);
if (message !== '') { if (message !== '') {
this.onMessageSubmitted(message, spoiler_hint); this.onMessageSubmitted(message, spoiler_hint);
_converse.emit('messageSend', message); _converse.emit('messageSend', message);