diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-11-06 13:23:52 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-11-06 13:23:52 +0000 |
commit | 26e88b10ada0023e177713697eb43c6d1b87d089 (patch) | |
tree | f76ab690990a2e1b91ca7d6014dd01071bbd46d9 | |
parent | 00c7d78d49ab94f963e1e6b0bb0428b395aa036a (diff) | |
download | gitlab-ce-53535-sticky-archived.tar.gz |
Polyfills sticky position within a watcher53535-sticky-archived
-rw-r--r-- | app/assets/javascripts/jobs/components/job_app.vue | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/app/assets/javascripts/jobs/components/job_app.vue b/app/assets/javascripts/jobs/components/job_app.vue index c3fb4c30b06..d23915966de 100644 --- a/app/assets/javascripts/jobs/components/job_app.vue +++ b/app/assets/javascripts/jobs/components/job_app.vue @@ -100,6 +100,14 @@ export default { if (_.isEmpty(oldVal) && !_.isEmpty(newVal.pipeline)) { this.fetchStages(); } + + if (newVal.archived) { + this.$nextTick(() => { + if (this.$refs.sticky) { + polyfillSticky(this.$refs.sticky); + } + }); + } }, }, created() { @@ -117,24 +125,13 @@ export default { window.addEventListener('resize', this.onResize); window.addEventListener('scroll', this.updateScroll); }, - mounted() { this.updateSidebar(); }, - - updated() { - this.$nextTick(() => { - if (this.$refs.sticky) { - polyfillSticky(this.$refs.sticky); - } - }); - }, - destroyed() { window.removeEventListener('resize', this.onResize); window.removeEventListener('scroll', this.updateScroll); }, - methods: { ...mapActions([ 'setJobEndpoint', |