From afb6e109e2ed6e4cec1a92f53ff4929f71882553 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Tue, 19 Jul 2022 14:41:49 -0300 Subject: [PATCH] Scroll to debug form on each operation --- debug.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debug.md b/debug.md index 954854f..b4a8d3e 100644 --- a/debug.md +++ b/debug.md @@ -34,15 +34,23 @@ The debuggers we use and recommend are: } } + function scrollDebug() { + /* Scroll to build form. */ + var debugform = document.getElementById('debugform'); + if (debugform.scrollIntoView) + debugform.scrollIntoView(); + } function showDebug() { /* Hide button and show form. */ document.getElementById('debugagree').style.display = 'none'; document.getElementById('debugform').style.display = 'block'; + scrollDebug(); } function submitDebug() { /* Show loading message. */ var debugbins = document.getElementById('debugbins'); debugbins.innerHTML = '
Loading build information...'; + scrollDebug(); /* Load build information from Jenkins. */ var script = document.createElement('script'); @@ -50,6 +58,7 @@ The debuggers we use and recommend are: script.onerror = function() { /* Show error message. */ debugbins.innerHTML = '
Could not load build information.'; + scrollDebug(); }; document.head.appendChild(script); } @@ -92,6 +101,8 @@ The debuggers we use and recommend are: } } } + + scrollDebug(); }