diff options
author | Sam Rose <sam@gitlab.com> | 2016-12-27 21:02:17 -0500 |
---|---|---|
committer | Sam Rose <sam@gitlab.com> | 2016-12-28 12:05:03 -0500 |
commit | 33251af3ab22f7df9d0f811f9f7c1f1a6577784b (patch) | |
tree | a08b331df96a1efa550236b4f6bf53a525a19429 /app/assets/javascripts/diff_notes | |
parent | 62b22583a76b145c3f4ffa67322cef195cf27579 (diff) | |
download | gitlab-ce-33251af3ab22f7df9d0f811f9f7c1f1a6577784b.tar.gz |
Defer tooltip update on Resolve Comment button after DOM cycle
Diffstat (limited to 'app/assets/javascripts/diff_notes')
-rw-r--r-- | app/assets/javascripts/diff_notes/components/resolve_btn.js.es6 | 10 |
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(); }); } }, |