diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-24 00:15:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-24 00:15:56 +0300 |
commit | 67770e6591eccb40cd9d6436370be5126c77544a (patch) | |
tree | 9422dcb456ad8918d863ab7498ea0d256bb3a7f5 /app/assets/javascripts/vue_shared/components/markdown | |
parent | 94299354d10c1c4758883eb92df56255f32dcbe9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/markdown')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/markdown/field.vue | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/markdown/field.vue b/app/assets/javascripts/vue_shared/components/markdown/field.vue index 171424b6d24..e1020ce656b 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/field.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/field.vue @@ -118,6 +118,7 @@ export default { markdownPreviewLoading: false, previewMarkdown: false, suggestions: this.note.suggestions || [], + debouncedFetchMarkdownLoading: false, }; }, computed: { @@ -203,8 +204,10 @@ export default { const justRemovedAll = hadAll && !hasAll; if (justAddedAll) { + this.debouncedFetchMarkdownLoading = false; this.debouncedFetchMarkdown(); } else if (justRemovedAll) { + this.debouncedFetchMarkdownLoading = true; this.referencedUsers = []; } }, @@ -284,7 +287,12 @@ export default { }, debouncedFetchMarkdown: debounce(function debouncedFetchMarkdown() { - return this.fetchMarkdown(); + return this.fetchMarkdown().then(() => { + if (this.debouncedFetchMarkdownLoading) { + this.referencedUsers = []; + this.debouncedFetchMarkdownLoading = false; + } + }); }, 400), renderMarkdown(data = {}) { |