|
|
@@ -2901,12 +2901,18 @@ from desktop.views import _ko
|
|
|
};
|
|
|
|
|
|
ChatPanel.prototype.autoResize = function (data, event) {
|
|
|
+ let self = this;
|
|
|
let inputArea = event.target;
|
|
|
let value = inputArea.value;
|
|
|
let oldValue = inputArea.style.height;
|
|
|
inputArea.style.height = 'auto';
|
|
|
let newValue = inputArea.scrollHeight;
|
|
|
- inputArea.style.height = inputArea.scrollHeight -20 + 'px';
|
|
|
+ if (self.query().length === 0) {
|
|
|
+ inputArea.style.height = 24 +'px';
|
|
|
+ } else {
|
|
|
+ inputArea.style.height = inputArea.scrollHeight -20 + 'px';
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
console.log(new Date() + " autoResize old:" + oldValue +" -> new:" +newValue +" value:" + value )
|
|
|
};
|