diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-06-02 16:16:54 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-06-02 16:16:54 +0000 |
commit | e7de234d6f27781938858bee0ccd01ab1fbd082f (patch) | |
tree | d987b4ea7e5545dd6af9ac56fcfa46f5cfb5964c /app/assets/javascripts/build.js | |
parent | aea03d7cdfb882762426dbb5cab805682afe5e2a (diff) | |
download | gitlab-ce-e7de234d6f27781938858bee0ccd01ab1fbd082f.tar.gz |
Use throttle when window is resized
Diffstat (limited to 'app/assets/javascripts/build.js')
-rw-r--r-- | app/assets/javascripts/build.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js index 1a602cbd8a7..072a899e9f2 100644 --- a/app/assets/javascripts/build.js +++ b/app/assets/javascripts/build.js @@ -64,7 +64,7 @@ window.Build = (function () { $(window) .off('resize.build') - .on('resize.build', this.sidebarOnResize.bind(this)); + .on('resize.build', _.throttle(this.sidebarOnResize.bind(this), 100)); this.updateArtifactRemoveDate(); @@ -250,6 +250,7 @@ window.Build = (function () { Build.prototype.sidebarOnResize = function () { this.toggleSidebar(this.shouldHideSidebarForViewport()); + this.verifyTopPosition(); if (this.$scrollContainer.getNiceScroll(0)) { |