diff options
author | David Gay <david@davidgay.org> | 2021-05-04 18:01:47 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-04 18:01:47 -0400 |
commit | 8e2f4d6f10a18a662880c0d4c1ee79fdb6a8b3f2 (patch) | |
tree | d8c38a42f41748414d33783df2b49c7a4dc0f7fb /app/views | |
parent | 2b1ff8fac52a010ef90cf3302ff5ae77e3398d66 (diff) |
Keep output scrolled down
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/game/finish_activity.js.erb | 3 |
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) { |