diff options
author | Phil Hughes <me@iamphill.com> | 2018-08-28 11:37:43 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-08-31 10:27:44 +0100 |
commit | 27bce7ad2c2bc6a13d98b38c2e5f47a077a6e52f (patch) | |
tree | 5454712a2c22254204c6d5dee4b7871316770aa8 /app/assets | |
parent | 9248240cf4589becb7dd97af1f42f53d1f82d305 (diff) | |
download | gitlab-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.vue | 12 |
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() { |