From 29177d72143963e71f82f9a83713623cac9b530e Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Wed, 10 Jan 2024 20:13:10 +0000 Subject: [PATCH] Scroll to the bottom when status messages appear The log viewer was scrolling to the bottom when new logs appeared, but not when the status updated. This meant that the status update may have been invisible. I now scroll when the status changes too, which should fix the problem. --- .../components/genericComponents/actionLogDisplay.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webapp/src/components/genericComponents/actionLogDisplay.vue b/webapp/src/components/genericComponents/actionLogDisplay.vue index bbd2b616..0fb81c2a 100644 --- a/webapp/src/components/genericComponents/actionLogDisplay.vue +++ b/webapp/src/components/genericComponents/actionLogDisplay.vue @@ -34,6 +34,15 @@ export default { watch: { log: function() { + this.scrollToBottom(); + }, + taskStatus: function() { + this.scrollToBottom(); + } + }, + + methods: { + scrollToBottom() { this.$nextTick(function() { let viewer = this.$refs.logContainer; viewer.scrollTop = viewer.scrollHeight;