From fb09a4b6936548ab783e24c842fddc44826981d5 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Thu, 10 Jul 2014 11:07:09 -0400 Subject: [PATCH] Job stdout page Fixed ability to restart automatic scroll-to-bottom while live events are streaming. When user scrolls up during live event processing automatic scroll-to-bottom stops. If user scrolls all the way to bottom, it now restarts. --- awx/ui/static/js/controllers/JobStdout.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/ui/static/js/controllers/JobStdout.js b/awx/ui/static/js/controllers/JobStdout.js index 2bbe06623f..3aab816ac4 100644 --- a/awx/ui/static/js/controllers/JobStdout.js +++ b/awx/ui/static/js/controllers/JobStdout.js @@ -135,6 +135,10 @@ function JobStdoutController ($log, $rootScope, $scope, $compile, $routeParams, if (detectDirection() === "up") { should_apply_live_events = false; } + + if ($(this).scrollTop() + $(this).height() === $(this).prop("scrollHeight")) { + should_apply_live_events = true; + } }); Rest.setUrl(GetBasePath('jobs') + job_id + '/');