summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-04 18:01:47 -0400
committerDavid Gay <david@davidgay.org>2021-05-04 18:01:47 -0400
commit8e2f4d6f10a18a662880c0d4c1ee79fdb6a8b3f2 (patch)
treed8c38a42f41748414d33783df2b49c7a4dc0f7fb
parent2b1ff8fac52a010ef90cf3302ff5ae77e3398d66 (diff)
Keep output scrolled down
-rw-r--r--app/views/game/finish_activity.js.erb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/views/game/finish_activity.js.erb b/app/views/game/finish_activity.js.erb
index 99d200c..0732600 100644
--- a/app/views/game/finish_activity.js.erb
+++ b/app/views/game/finish_activity.js.erb
@@ -5,6 +5,9 @@ var outputHTML = "<%= j render(partial: "activities/results", locals: { results:
if (resultOutputDiv) {
resultOutputDiv.innerHTML += outputHTML;
+ resultOutputDiv.scrollTo({
+ top: resultOutputDiv.scrollHeight, left: 0, behavior: 'smooth'
+ });
}
if (resultControlsDiv) {