Commit d08f7386 authored by JC Brand's avatar JC Brand

Bugfix: Restore textarea size after sending message

parent 7e34a462
......@@ -8,6 +8,7 @@
- Set releases URL to new Github repo
- Rudimentary support for XEP-0333 chat markers
- Better support for XEP-0359 `stanza-id` and `origin-id` elements.
- Bugfix: restore textarea size after sending a message
- #1369 Don't wrongly interpret message with `subject` as a topic change.
- #1405 Status of contacts list are not displayed properly
- #1408 New config option `roomconfig_whitelist`
......
......@@ -50039,16 +50039,14 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_5__["default"].plugins
if (this.parseMessageForCommands(message) || (await this.model.sendMessage(this.model.getOutgoingMessageAttributes(message, spoiler_hint)))) {
hint_el.value = '';
textarea.value = '';
_converse_headless_utils_emoji__WEBPACK_IMPORTED_MODULE_21__["default"].removeClass('correcting', textarea); // Trigger input event, so that the textarea resizes
const event = document.createEvent('Event');
event.initEvent('input', true, true);
textarea.dispatchEvent(event);
_converse_headless_utils_emoji__WEBPACK_IMPORTED_MODULE_21__["default"].removeClass('correcting', textarea);
textarea.style.height = 'auto'; // Fixes weirdness
_converse.emit('messageSend', message);
}
textarea.removeAttribute('disabled');
_converse_headless_utils_emoji__WEBPACK_IMPORTED_MODULE_21__["default"].removeClass('disabled', textarea);
textarea.focus(); // Suppress events, otherwise superfluous CSN gets set
// immediately after the message, causing rate-limiting issues.
......@@ -872,16 +872,15 @@ converse.plugins.add('converse-chatview', {
textarea.setAttribute('disabled', 'disabled');
if (this.parseMessageForCommands(message) ||
await this.model.sendMessage(this.model.getOutgoingMessageAttributes(message, spoiler_hint))) {
hint_el.value = '';
textarea.value = '';
u.removeClass('correcting', textarea);
// Trigger input event, so that the textarea resizes
const event = document.createEvent('Event');
event.initEvent('input', true, true);
textarea.dispatchEvent(event);
textarea.style.height = 'auto'; // Fixes weirdness
_converse.emit('messageSend', message);
}
textarea.removeAttribute('disabled');
u.removeClass('disabled', textarea);
textarea.focus();
// Suppress events, otherwise superfluous CSN gets set
// immediately after the message, causing rate-limiting issues.
......
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