From 0aeefcef14e459aea7d42f7aba1e7933536ee235 Mon Sep 17 00:00:00 2001
From: Fatih Acet <acetfatih@gmail.com>
Date: Mon, 26 Dec 2016 18:58:34 +0000
Subject: [PATCH] Merge branch '26040-hide-scroll-top' into 'master'

Hide Scroll Top button for failed Build page

Closes #26040

See merge request !8295
---
 app/assets/javascripts/build.js                 | 4 ++--
 changelogs/unreleased/26040-hide-scroll-top.yml | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)
 create mode 100644 changelogs/unreleased/26040-hide-scroll-top.yml

diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js
index 5e449170cd..bc13c46443 100644
--- a/app/assets/javascripts/build.js
+++ b/app/assets/javascripts/build.js
@@ -92,8 +92,8 @@
         success: function(buildData) {
           $('.js-build-output').html(buildData.trace_html);
           if (removeRefreshStatuses.indexOf(buildData.status) >= 0) {
-            this.initScrollMonitor();
-            return this.$buildRefreshAnimation.remove();
+            this.$buildRefreshAnimation.remove();
+            return this.initScrollMonitor();
           }
         }.bind(this)
       });
diff --git a/changelogs/unreleased/26040-hide-scroll-top.yml b/changelogs/unreleased/26040-hide-scroll-top.yml
new file mode 100644
index 0000000000..f68cb1dd51
--- /dev/null
+++ b/changelogs/unreleased/26040-hide-scroll-top.yml
@@ -0,0 +1,4 @@
+---
+title: Hide Scroll Top button for failed build page
+merge_request: 8295
+author:
-- 
2.30.9