mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-09-20 18:45:09 +02:00
Fix chat scrolling with Dark Reader extension
This commit is contained in:
parent
b2296dcda0
commit
0986868b1b
1 changed files with 2 additions and 1 deletions
|
@ -73,7 +73,8 @@ const targetElement = document.getElementById('chat').parentNode.parentNode.pare
|
|||
// Create a MutationObserver instance
|
||||
const observer = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
let childElement = targetElement.childNodes[2].childNodes[0].childNodes[1];
|
||||
let nodes = targetElement.childNodes[2].childNodes[0].childNodes;
|
||||
let childElement = nodes[nodes.length - 1];
|
||||
childElement.scrollTop = childElement.scrollHeight;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue