From 9940c91ebf22dcb11db60949a8378e3eb635b0c7 Mon Sep 17 00:00:00 2001 From: d-volution <49024624+d-volution@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:42:27 +0200 Subject: [PATCH] gui: Scroll to bottom by clicking message in log viewer (#9128) --- gui/default/syncthing/core/logViewerModalView.html | 2 +- gui/default/syncthing/core/syncthingController.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/default/syncthing/core/logViewerModalView.html b/gui/default/syncthing/core/logViewerModalView.html index f958cc000..184a0ecc8 100644 --- a/gui/default/syncthing/core/logViewerModalView.html +++ b/gui/default/syncthing/core/logViewerModalView.html @@ -9,7 +9,7 @@
-

Log tailing paused. Scroll to the bottom to continue.

+ Log tailing paused. Scroll to the bottom to continue.
diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index efbdbba17..b09965f9f 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1430,6 +1430,11 @@ angular.module('syncthing.core') // Browser events do not cause redraw, trigger manually. $scope.$apply(); }, + scrollToBottom: function () { + var textArea = $('#logViewerText'); + var scrollHeight = textArea.prop('scrollHeight'); + textArea.prop('scrollTop', scrollHeight); + }, timer: null, entries: [], paused: false,