diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-20 15:43:31 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-04-20 15:43:31 +0000 |
commit | 87f5682b3b80c468f5d209ee76cdbe4781dc597d (patch) | |
tree | 85c419aaad6b653d9bde8dc5c1127ce1815e211b | |
parent | f5dc8910d6a323ed394227cce2a2b5a16dbdd883 (diff) | |
parent | 5fb615ea51de81f15c8fc61e9018dce74c06ca7a (diff) | |
download | gitlab-ce-87f5682b3b80c468f5d209ee76cdbe4781dc597d.tar.gz |
Merge branch '9-1-issue-title-on-load' into '9-1-stable'
same fix on stable for issue title poll on load visibility check
See merge request !10820
-rw-r--r-- | app/assets/javascripts/issue_show/issue_title.js | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/app/assets/javascripts/issue_show/issue_title.js b/app/assets/javascripts/issue_show/issue_title.js index 1184c8956dc..2d474721270 100644 --- a/app/assets/javascripts/issue_show/issue_title.js +++ b/app/assets/javascripts/issue_show/issue_title.js @@ -33,17 +33,6 @@ export default { }; }, methods: { - fetch() { - this.poll.makeRequest(); - - Visibility.change(() => { - if (!Visibility.hidden()) { - this.poll.restart(); - } else { - this.poll.stop(); - } - }); - }, renderResponse(res) { const body = JSON.parse(res.body); this.triggerAnimation(body); @@ -70,7 +59,17 @@ export default { }, }, created() { - this.fetch(); + if (!Visibility.hidden()) { + this.poll.makeRequest(); + } + + Visibility.change(() => { + if (!Visibility.hidden()) { + this.poll.restart(); + } else { + this.poll.stop(); + } + }); }, template: ` <h2 class='title' v-html='title'></h2> |