Commit b939de03 authored by JC Brand's avatar JC Brand

Make sure that the textarea resizes back to original size

after sending
parent fe8b2572
...@@ -885,6 +885,11 @@ ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment