Commit 38abbafe authored by Clement Ho's avatar Clement Ho Committed by Fatih Acet

Disable autocomplete for epics

parent 522f4f13
......@@ -34,6 +34,11 @@ export default {
required: false,
default: true,
},
enableAutocomplete: {
type: Boolean,
required: false,
default: true,
},
issuableRef: {
type: String,
required: true,
......@@ -240,6 +245,7 @@ export default {
:project-namespace="projectNamespace"
:show-delete-button="showDeleteButton"
:can-attach-file="canAttachFile"
:enable-autocomplete="enableAutocomplete"
/>
<div v-else>
<title-component
......
......@@ -22,6 +22,11 @@
required: false,
default: true,
},
enableAutocomplete: {
type: Boolean,
required: false,
default: true,
},
},
components: {
markdownField,
......@@ -42,7 +47,9 @@
<markdown-field
:markdown-preview-path="markdownPreviewPath"
:markdown-docs-path="markdownDocsPath"
:can-attach-file="canAttachFile">
:can-attach-file="canAttachFile"
:enable-autocomplete="enableAutocomplete"
>
<textarea
id="issue-description"
class="note-textarea js-gfm-input js-autosize markdown-area"
......
......@@ -46,6 +46,11 @@
required: false,
default: true,
},
enableAutocomplete: {
type: Boolean,
required: false,
default: true,
},
},
components: {
lockedWarning,
......@@ -89,7 +94,9 @@
:form-state="formState"
:markdown-preview-path="markdownPreviewPath"
:markdown-docs-path="markdownDocsPath"
:can-attach-file="canAttachFile" />
:can-attach-file="canAttachFile"
:enable-autocomplete="enableAutocomplete"
/>
<edit-actions
:form-state="formState"
:can-destroy="canDestroy"
......
......@@ -30,6 +30,11 @@
required: false,
default: true,
},
enableAutocomplete: {
type: Boolean,
required: false,
default: true,
},
},
data() {
return {
......@@ -97,7 +102,7 @@
/*
GLForm class handles all the toolbar buttons
*/
return new GLForm($(this.$refs['gl-form']), true);
return new GLForm($(this.$refs['gl-form']), this.enableAutocomplete);
},
beforeDestroy() {
const glForm = $(this.$refs['gl-form']).data('gl-form');
......
---
title: Disable autocomplete for epics
merge_request:
author:
type: fixed
......@@ -123,6 +123,7 @@
:show-inline-edit-button="true"
:show-delete-button="false"
:can-attach-file="false"
:enable-autocomplete="false"
/>
</div>
<epic-sidebar
......
......@@ -50,6 +50,16 @@ feature 'Update Epic', :js do
expect(page).not_to have_selector('.uploading-container .button-attach-file')
end
# Autocomplete is disabled for epics until #4084 is resolved
describe 'autocomplete disabled' do
it 'does not open atwho container' do
find('.btn-edit').click
find('#issue-description').native.send_keys('@')
expect(page).not_to have_selector('.atwho-container')
end
end
end
context 'when user with owner access displays the epic' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment