summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-06-30 09:42:19 +0000
committerPhil Hughes <me@iamphill.com>2017-06-30 09:42:19 +0000
commit81dba76b9d7d120cd22e3619a4058bd4885be9bc (patch)
treeeeb96e0c09b3ad5157fd59d237ba35fedb0e4328
parent4a9ffb2376163ce6c81dcf09ad3601098cc7d23d (diff)
parent49b747725ef5932d34ed83e028f77b2d370fd76a (diff)
downloadgitlab-ce-81dba76b9d7d120cd22e3619a4058bd4885be9bc.tar.gz
Merge branch '34461-top-banner-job-master' into 'master'
Only verifies top position after the request has finished to account for errors See merge request !12559
-rw-r--r--app/assets/javascripts/build.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js
index 9974e135022..60103155ce0 100644
--- a/app/assets/javascripts/build.js
+++ b/app/assets/javascripts/build.js
@@ -85,9 +85,8 @@ window.Build = (function () {
if (!this.hasBeenScrolled) {
this.scrollToBottom();
}
- });
-
- this.verifyTopPosition();
+ })
+ .then(() => this.verifyTopPosition());
}
Build.prototype.canScroll = function () {
@@ -176,7 +175,7 @@ window.Build = (function () {
}
if ($flashError.length) {
- topPostion += $flashError.outerHeight();
+ topPostion += $flashError.outerHeight() + prependTopDefault;
}
this.$buildTrace.css({
@@ -234,7 +233,8 @@ window.Build = (function () {
if (!this.hasBeenScrolled) {
this.scrollToBottom();
}
- });
+ })
+ .then(() => this.verifyTopPosition());
}, 4000);
} else {
this.$buildRefreshAnimation.remove();