Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-07-14 18:07:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-14 18:07:17 +0300
commit2aea9a0c91723b8800b016335930c59390cda7c9 (patch)
treef223b5ef5cf7ee847cfc4875b3c02ec265f91c2d /app/assets/javascripts/issues
parent14a0edee5c04b04b5281f99ce7f6ba75b919dba1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/issues')
-rw-r--r--app/assets/javascripts/issues/show/components/fields/description.vue11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/assets/javascripts/issues/show/components/fields/description.vue b/app/assets/javascripts/issues/show/components/fields/description.vue
index c9769dc9275..a1463d0e911 100644
--- a/app/assets/javascripts/issues/show/components/fields/description.vue
+++ b/app/assets/javascripts/issues/show/components/fields/description.vue
@@ -2,6 +2,8 @@
import { __ } from '~/locale';
import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue';
import glFeaturesFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
+import { trackSavedUsingEditor } from '~/vue_shared/components/markdown/tracking';
+import { ISSUE_NOTEABLE_TYPE } from '~/notes/constants';
import updateMixin from '../../mixins/update';
export default {
@@ -55,6 +57,10 @@ export default {
focus() {
this.$refs.textarea?.focus();
},
+ saveIssuable() {
+ trackSavedUsingEditor(this.$refs.markdownEditor.isContentEditorActive, ISSUE_NOTEABLE_TYPE);
+ this.updateIssuable();
+ },
},
};
</script>
@@ -63,6 +69,7 @@ export default {
<div class="common-note-form">
<label class="sr-only" for="issue-description">{{ __('Description') }}</label>
<markdown-editor
+ ref="markdownEditor"
:enable-content-editor="Boolean(glFeatures.contentEditorOnIssues)"
class="gl-mt-3"
:value="value"
@@ -75,8 +82,8 @@ export default {
autofocus
data-qa-selector="description_field"
@input="$emit('input', $event)"
- @keydown.meta.enter="updateIssuable"
- @keydown.ctrl.enter="updateIssuable"
+ @keydown.meta.enter="saveIssuable"
+ @keydown.ctrl.enter="saveIssuable"
/>
</div>
</template>