diff --git a/webapp/src/components/labThingsComponents/actionLogDisplay.vue b/webapp/src/components/labThingsComponents/actionLogDisplay.vue index db8d4535..1d111287 100644 --- a/webapp/src/components/labThingsComponents/actionLogDisplay.vue +++ b/webapp/src/components/labThingsComponents/actionLogDisplay.vue @@ -1,4 +1,9 @@ + The task completed successfully. + + + + + Auto-scroll paused + @@ -35,6 +46,12 @@ export default { } }, + data() { + return { + userIsHovering: false, + }; + }, + watch: { log: function() { this.scrollToBottom(); @@ -45,9 +62,19 @@ export default { }, methods: { + onMouseEnter() { + this.userIsHovering = true; + }, + onMouseLeave() { + this.userIsHovering = false; + }, + scrollToBottom() { - this.$nextTick(function() { - let viewer = this.$refs.logContainer; + /*Scroll to bottom of log unless the user is hovering over the log.*/ + this.$nextTick(() => { + if (this.userIsHovering) return; + + const viewer = this.$refs.logContainer; viewer.scrollTop = viewer.scrollHeight; }); } @@ -56,13 +83,38 @@ export default {