mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Fix chat scrolling with Dark Reader extension
This commit is contained in:
parent
b2296dcda0
commit
0986868b1b
@ -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 New Issue
Block a user