Don't unnecessarily set height on textarea

This commit is contained in:
JC Brand 2019-01-11 18:38:09 +01:00
parent 12700ef402
commit 79990f7e01
3 changed files with 12 additions and 4 deletions

View File

@ -5,6 +5,7 @@
- Bugfix: MUC commands were being ignored
- Bugfix: Multiple rooms shown active in the rooms list
- Bugfix: Don't open chats when receiving messages without a `body`
- Bugfix: Typing in the textarea can become very slow in large MUCs
- UI: Always show the OMEMO lock icon (grayed out if not available).
- Use `publish-options` with `pubsub#access_model` set to `open` when publishing OMEMO public keys and devices
- Add a new `converse-pubsub` plugin, for generic PubSub operations

8
dist/converse.js vendored
View File

@ -50420,9 +50420,13 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_5__["default"].plugins
},
inputChanged(ev) {
ev.target.style.height = 'auto'; // Fixes weirdness
const new_height = ev.target.scrollHeight + 'px';
ev.target.style.height = ev.target.scrollHeight + 'px';
if (ev.target.style.height !== new_height) {
ev.target.style.height = 'auto'; // Fixes weirdness
ev.target.style.height = new_height;
}
},
clearMessages(ev) {

View File

@ -1008,8 +1008,11 @@ converse.plugins.add('converse-chatview', {
},
inputChanged (ev) {
ev.target.style.height = 'auto'; // Fixes weirdness
ev.target.style.height = (ev.target.scrollHeight) + 'px';
const new_height = ev.target.scrollHeight + 'px';
if (ev.target.style.height !== new_height) {
ev.target.style.height = 'auto'; // Fixes weirdness
ev.target.style.height = new_height;
}
},
clearMessages (ev) {