Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-05-23 12:11:52 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-05-23 12:22:39 +0300
commit1d77de4713f49ccacb6e8819bc70321b5950ab28 (patch)
tree5e7379af4a2af765c7fc4c9a356bd649cfa76edd /app
parent8c22568d4035712fdba913a96e61f57b65b8aa17 (diff)
Merge branch 'ide-commit-state-bug' into 'master'
Fixed web IDE review & commit editors getting into incorrect state Closes #46392 See merge request gitlab-org/gitlab-ce!19038
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/ide/components/repo_editor.vue9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/components/repo_editor.vue b/app/assets/javascripts/ide/components/repo_editor.vue
index f8678b602ac..f2178c06c10 100644
--- a/app/assets/javascripts/ide/components/repo_editor.vue
+++ b/app/assets/javascripts/ide/components/repo_editor.vue
@@ -43,9 +43,13 @@ export default {
},
},
watch: {
- file(oldVal, newVal) {
+ file(newVal, oldVal) {
+ if (oldVal.pending) {
+ this.removePendingTab(oldVal);
+ }
+
// Compare key to allow for files opened in review mode to be cached differently
- if (newVal.key !== this.file.key) {
+ if (oldVal.key !== this.file.key) {
this.initMonaco();
if (this.currentActivityView !== activityBarViews.edit) {
@@ -99,6 +103,7 @@ export default {
'setFileViewMode',
'setFileEOL',
'updateViewer',
+ 'removePendingTab',
]),
initMonaco() {
if (this.shouldHideEditor) return;