summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Rose <sam@gitlab.com>2016-12-27 21:02:17 -0500
committerSam Rose <sam@gitlab.com>2016-12-27 21:02:17 -0500
commitf319016f2d7aaa19898f76f3eb85329edc2928b7 (patch)
tree034cb245f2295e2577a247f76a964e70eed4985c
parent62b22583a76b145c3f4ffa67322cef195cf27579 (diff)
downloadgitlab-ce-25957-marking-a-diff-discussion-as-resolved-doesn-t-update-tooltips.tar.gz
Defer tooltip update on Resolve Comment button after DOM cycle25957-marking-a-diff-discussion-as-resolved-doesn-t-update-tooltips
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_btn.js.es66
1 files changed, 4 insertions, 2 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..caccadd0216 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)
+ 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();
});
}
},