summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-12-28 18:49:19 +0000
committerFatih Acet <acetfatih@gmail.com>2016-12-28 18:49:19 +0000
commit12b6fdb194cef690fb6fcdba329ccb7a76e96e8d (patch)
tree5faffc124458c90c9e073f088fbf136056c31a96
parent6f91c3ceb6f5c15211b6931f542e5fabc4a396d8 (diff)
parent33251af3ab22f7df9d0f811f9f7c1f1a6577784b (diff)
downloadgitlab-ce-12b6fdb194cef690fb6fcdba329ccb7a76e96e8d.tar.gz
Merge branch '25957-marking-a-diff-discussion-as-resolved-doesn-t-update-tooltips' into 'master'
Defer tooltip update on Resolve Comment button after DOM cycle Closes #25957 See merge request !8335
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_btn.js.es610
1 files changed, 6 insertions, 4 deletions
diff --git a/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6 b/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6
index 88a19fc6e1d..5852b8bbdb7 100644
--- a/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6
+++ b/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6
@@ -59,9 +59,11 @@
},
methods: {
updateTooltip: function () {
- $(this.$refs.button)
- .tooltip('hide')
- .tooltip('fixTitle');
+ this.$nextTick(() => {
+ $(this.$refs.button)
+ .tooltip('hide')
+ .tooltip('fixTitle');
+ });
},
resolve: function () {
if (!this.canResolve) return;
@@ -90,7 +92,7 @@
new Flash('An error occurred when trying to resolve a comment. Please try again.', 'alert');
}
- this.$nextTick(this.updateTooltip);
+ this.updateTooltip();
});
}
},