Fix to autoscroll output.
Browse files- package.json +1 -1
- src/app/output-message.js +1 -1
package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "localm",
|
| 3 |
-
"version": "1.1.
|
| 4 |
"description": "",
|
| 5 |
"main": "chat-full.js",
|
| 6 |
"scripts": {
|
|
|
|
| 1 |
{
|
| 2 |
"name": "localm",
|
| 3 |
+
"version": "1.1.10",
|
| 4 |
"description": "",
|
| 5 |
"main": "chat-full.js",
|
| 6 |
"scripts": {
|
src/app/output-message.js
CHANGED
|
@@ -27,7 +27,7 @@ export function outputMessage(msg) {
|
|
| 27 |
view.dispatch(tr);
|
| 28 |
});
|
| 29 |
// Scroll chat log to bottom (smooth if possible)
|
| 30 |
-
const chatLogElem = document.querySelector('.chat-log');
|
| 31 |
if (chatLogElem) {
|
| 32 |
if (typeof chatLogElem.scrollTo === 'function') {
|
| 33 |
chatLogElem.scrollTo({ top: chatLogElem.scrollHeight, behavior: 'smooth' });
|
|
|
|
| 27 |
view.dispatch(tr);
|
| 28 |
});
|
| 29 |
// Scroll chat log to bottom (smooth if possible)
|
| 30 |
+
const chatLogElem = document.querySelector('.chat-log .milkdown .ProseMirror');
|
| 31 |
if (chatLogElem) {
|
| 32 |
if (typeof chatLogElem.scrollTo === 'function') {
|
| 33 |
chatLogElem.scrollTo({ top: chatLogElem.scrollHeight, behavior: 'smooth' });
|