From b33a2a3bd7b80ef6013f523687639f88309a694e Mon Sep 17 00:00:00 2001 From: ForeverPyrite Date: Tue, 7 Jan 2025 16:57:44 -0500 Subject: [PATCH] Fixed scrolling on overflow --- app/website/index.html | 2 +- app/website/static/script.js | 3 ++- app/website/static/style.css | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/website/index.html b/app/website/index.html index a03369a..fd97afb 100644 --- a/app/website/index.html +++ b/app/website/index.html @@ -12,7 +12,7 @@
-
+
Response will appear here.
diff --git a/app/website/static/script.js b/app/website/static/script.js index ec2793a..891ad5e 100644 --- a/app/website/static/script.js +++ b/app/website/static/script.js @@ -1,5 +1,6 @@ document.addEventListener("DOMContentLoaded", () => { const responseArea = document.getElementById('response-area'); + const responseSection = document.getElementById('response-section'); const submitButton = document.getElementById('submit'); const urlForm = document.getElementById('url-form'); const urlBox = document.getElementById('url_box'); @@ -67,7 +68,7 @@ document.addEventListener("DOMContentLoaded", () => { } const chunk = decoder.decode(value, { stream: true }); responseArea.innerHTML += chunk; - responseArea.scrollTop = responseArea.scrollHeight; + responseSection.scrollTop = responseSection.scrollHeight readStream(); }).catch(error => { console.error('Error reading stream:', error); diff --git a/app/website/static/style.css b/app/website/static/style.css index 541c0d4..5d3c6c5 100644 --- a/app/website/static/style.css +++ b/app/website/static/style.css @@ -33,7 +33,7 @@ body { overflow: hidden; } -.response-section { +#response-section { flex: 1; padding: 20px; background-color: #1E1E1E;