Skip to content

Commit

Permalink
scrolls output to top when running, changing example or changing mode
Browse files Browse the repository at this point in the history
  • Loading branch information
joaovictor3g committed Apr 30, 2024
1 parent e5469ef commit 4094bd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/assets/js/components/accordions/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,14 @@ function renderAccordions(key, values, index = 0) {

export function hideAccordions() {
outputResultEl.style.display = "none";
holderEl.scrollTo({ top: 0, behavior: "smooth" });
}

export function handleRenderAccordions(result) {
outputResultEl.innerHTML = "";
outputResultEl.style.display = "flex";
outputResultEl.scrollTo({ top: 0, behavior: "smooth" });

holderEl.scrollTo({ top: 0, behavior: "smooth" });
holderEl.style.overflowY = "auto";
holderEl.style.overflowX = "hidden";

Expand Down

0 comments on commit 4094bd5

Please sign in to comment.