diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-30 15:10:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-30 15:10:07 +0300 |
commit | 743810720d0e5fa9e2d4c0ed9df7f955b3130ab1 (patch) | |
tree | cf98fd99c3785837345feb1028f16072a3ebc243 /app/assets/javascripts/vue_shared | |
parent | f38060aeee94f359484c17797881aca4f5f826a9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/blob_viewers/rich_viewer.vue | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/vue_shared/components/blob_viewers/rich_viewer.vue b/app/assets/javascripts/vue_shared/components/blob_viewers/rich_viewer.vue index 27bdcc69120..b52752d7e2f 100644 --- a/app/assets/javascripts/vue_shared/components/blob_viewers/rich_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/blob_viewers/rich_viewer.vue @@ -41,7 +41,6 @@ export default { mounted() { this.renderRemainingMarkup(); handleBlobRichViewer(this.$refs.content, this.type); - handleLocationHash(); }, methods: { optimizeMarkupRendering() { @@ -76,8 +75,7 @@ export default { * */ if (!this.isMarkup || !this.remainingContent.length) { - this.$emit(CONTENT_LOADED_EVENT); - this.isLoading = false; + this.onContentLoaded(); return; } @@ -89,11 +87,15 @@ export default { setTimeout(() => { fileContent.append(...content); if (nextChunkEnd < this.remainingContent.length) return; - this.$emit(CONTENT_LOADED_EVENT); - this.isLoading = false; + this.onContentLoaded(); }, i); } }, + onContentLoaded() { + this.$emit(CONTENT_LOADED_EVENT); + handleLocationHash(); + this.isLoading = false; + }, }, safeHtmlConfig: { ADD_TAGS: ['gl-emoji', 'copy-code'], |