diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /app/assets/javascripts/pages/shared/wikis/components | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'app/assets/javascripts/pages/shared/wikis/components')
-rw-r--r-- | app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue b/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue index 26f6d1d683a..e883fecb170 100644 --- a/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue +++ b/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue @@ -212,13 +212,20 @@ export default { .then(({ data }) => data.body); }, - handleFormSubmit() { + async handleFormSubmit(e) { + e.preventDefault(); + if (this.useContentEditor) { this.content = this.contentEditor.getSerializedContent(); this.trackFormSubmit(); } + // Wait until form field values are refreshed + await this.$nextTick(); + + e.target.submit(); + this.isDirty = false; }, @@ -257,6 +264,7 @@ export default { this.contentEditor || createContentEditor({ renderMarkdown: (markdown) => this.getContentHTML(markdown), + uploadsPath: this.pageInfo.uploadsPath, tiptapOptions: { onUpdate: () => this.handleContentChange(), }, @@ -454,7 +462,7 @@ export default { </markdown-field> <div v-if="isContentEditorActive"> - <gl-alert class="gl-mb-6" variant="tip" :dismissable="false"> + <gl-alert class="gl-mb-6" variant="tip" :dismissible="false"> <gl-sprintf :message="$options.i18n.contentEditor.feedbackTip"> <template #link="// eslint-disable-next-line vue/no-template-shadow @@ -468,7 +476,11 @@ export default { > </gl-sprintf> </gl-alert> - <gl-loading-icon v-if="isContentEditorLoading" class="bordered-box gl-w-full gl-py-6" /> + <gl-loading-icon + v-if="isContentEditorLoading" + size="sm" + class="bordered-box gl-w-full gl-py-6" + /> <content-editor v-else :content-editor="contentEditor" /> <input id="wiki_content" v-model.trim="content" type="hidden" name="wiki[content]" /> </div> |