Differences From Artifact [9e80ea5d27]:
- File src/chat.js — part of check-in [299fd6905f] at 2020-12-27 21:22:26 on branch trunk — Refactored the calc-elem-effective-height routine into the fossil.dom API for reuse elsewhere. Fixed (arguably) a minor layout quirk in the chat input field in multi-line mode. (user: stephan size: 40144)
To Artifact [4ef8f59791]:
- File src/chat.js — part of check-in [423ee8101a] at 2020-12-27 22:01:17 on branch trunk — chat: when toggling between single/multi-line mode, retain the message area scroll position, insofar as its size allows for (e.g. might not work if the history is too short to scroll). (user: stephan size: 40304)
| ︙ | |||
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | + + + |
inputToggleSingleMulti: function(){
const old = this.e.inputCurrent;
if(this.e.inputCurrent === this.e.inputSingle){
this.e.inputCurrent = this.e.inputMulti;
}else{
this.e.inputCurrent = this.e.inputSingle;
}
const ht1 = D.effectiveHeight(old);
D.addClass(old, 'hidden');
D.removeClass(this.e.inputCurrent, 'hidden');
const ht2 = D.effectiveHeight(this.e.inputCurrent);
this.e.messagesWrapper.scrollBy(0, ht2 - ht1);
this.e.inputCurrent.value = old.value;
old.value = '';
return this;
},
/** Enables (if yes is truthy) or disables all elements in
* this.disableDuringAjax. */
enableAjaxComponents: function(yes){
|
| ︙ |