summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-08-28 11:37:43 +0100
committerPhil Hughes <me@iamphill.com>2018-08-31 10:27:44 +0100
commit27bce7ad2c2bc6a13d98b38c2e5f47a077a6e52f (patch)
tree5454712a2c22254204c6d5dee4b7871316770aa8 /app/assets
parent9248240cf4589becb7dd97af1f42f53d1f82d305 (diff)
downloadgitlab-ce-27bce7ad2c2bc6a13d98b38c2e5f47a077a6e52f.tar.gz
Fixed IDE file row jumping into view on hover
Closes #50751
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/ide/components/repo_file.vue12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/ide/components/repo_file.vue b/app/assets/javascripts/ide/components/repo_file.vue
index dbdf0be2809..110eda83bb4 100644
--- a/app/assets/javascripts/ide/components/repo_file.vue
+++ b/app/assets/javascripts/ide/components/repo_file.vue
@@ -95,16 +95,18 @@ export default {
return this.file.changed || this.file.tempFile || this.file.staged;
},
},
+ watch: {
+ 'file.active': function fileActiveWatch(active) {
+ if (this.file.type === 'blob' && active) {
+ this.scrollIntoView();
+ }
+ },
+ },
mounted() {
if (this.hasPathAtCurrentRoute()) {
this.scrollIntoView(true);
}
},
- updated() {
- if (this.file.type === 'blob' && this.file.active) {
- this.scrollIntoView();
- }
- },
methods: {
...mapActions(['toggleTreeOpen']),
clickFile() {