summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRegis Boudinot <boudinot.regis@yahoo.com>2017-04-20 14:20:19 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-04-20 14:20:19 +0000
commit44c52fa3cd4b20e1328995ced107dc03ad8bd89f (patch)
treebd83d97735bb39e1c6e00d07ff7aec83e7d2098b
parent33a25e0fc61a1436bfbe9b1e3079c5790a726492 (diff)
downloadgitlab-ce-44c52fa3cd4b20e1328995ced107dc03ad8bd89f.tar.gz
Issue Title Show Focus Check On Load
-rw-r--r--app/assets/javascripts/issue_show/issue_title.vue23
1 files changed, 11 insertions, 12 deletions
diff --git a/app/assets/javascripts/issue_show/issue_title.vue b/app/assets/javascripts/issue_show/issue_title.vue
index ba54178a310..00b0e56030a 100644
--- a/app/assets/javascripts/issue_show/issue_title.vue
+++ b/app/assets/javascripts/issue_show/issue_title.vue
@@ -34,17 +34,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);
@@ -71,7 +60,17 @@ export default {
},
},
created() {
- this.fetch();
+ if (!Visibility.hidden()) {
+ this.poll.makeRequest();
+ }
+
+ Visibility.change(() => {
+ if (!Visibility.hidden()) {
+ this.poll.restart();
+ } else {
+ this.poll.stop();
+ }
+ });
},
};
</script>