diff --git a/searx/webapp.py b/searx/webapp.py
index 5f3d589d5..c612b73f3 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -1194,7 +1194,1074 @@ const net_search = ''' + net_search_str + r'''
const add_system = ''' + add_system +r'''
'''
diff --git a/searx/webapp1.py b/searx/webapp1.py
index 06a378f7b..c612b73f3 100644
--- a/searx/webapp1.py
+++ b/searx/webapp1.py
@@ -1365,6 +1365,7 @@ function modal_open(url, num)
if (done) return;
const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) {
+ try{document.querySelector("#chat_talk").scrollTop = document.querySelector("#chat_talk").scrollHeight}catch(e){}
result = ''
if(v.length>6) result = v.slice(6);
if(result == "[DONE]")
@@ -1698,6 +1699,7 @@ prev_chat = prev_chat+'
'+document.querySelector("#pro
if (done) return;
const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) {
+ try{document.querySelector("#chat_talk").scrollTop = document.querySelector("#chat_talk").scrollHeight}catch(e){}
result = ''
if(v.length>6) result = v.slice(6);
if(result == "[DONE]")
@@ -1834,6 +1836,7 @@ prev_chat = prev_chat+'
'+document.querySelector("#pro
if (done) return;
const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) {
+ try{document.querySelector("#chat_talk").scrollTop = document.querySelector("#chat_talk").scrollHeight}catch(e){}
result = ''
if(v.length>6) result = v.slice(6);
if(result == "[DONE]")
@@ -1924,6 +1927,7 @@ prev_chat = prev_chat+'
'+document.querySelector("#pro
if (done) return;
const text = new TextDecoder('utf-8').decode(value);
text.trim().split('\n').forEach(function(v) {
+ try{document.querySelector("#chat_talk").scrollTop = document.querySelector("#chat_talk").scrollHeight}catch(e){}
result = ''
if(v.length>6) result = v.slice(6);
if(result == "[DONE]")