summaryrefslogtreecommitdiff
path: root/app/views/shared/notes
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-06-12 14:42:12 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-06-19 13:42:12 -0500
commite51078ecfc4aeae7bdfa0ced45fe0de21c9afd8c (patch)
treeaab5841cb6e17abed46c8d9176978c4484d6b61e /app/views/shared/notes
parentdbfafd442ee863e6614d0f6765285fcd06f3d843 (diff)
downloadgitlab-ce-e51078ecfc4aeae7bdfa0ced45fe0de21c9afd8c.tar.gz
Disable autocomplete on snippets comments
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/33594 Was supposedly fixed in MR for https://gitlab.com/gitlab-org/gitlab-ce/issues/32086 but seeing this pop up again
Diffstat (limited to 'app/views/shared/notes')
-rw-r--r--app/views/shared/notes/_form.html.haml4
-rw-r--r--app/views/shared/notes/_notes_with_form.html.haml2
2 files changed, 4 insertions, 2 deletions
diff --git a/app/views/shared/notes/_form.html.haml b/app/views/shared/notes/_form.html.haml
index 32ff505cbda..c6b5dcc3647 100644
--- a/app/views/shared/notes/_form.html.haml
+++ b/app/views/shared/notes/_form.html.haml
@@ -1,3 +1,4 @@
+- supports_autocomplete = local_assigns.fetch(:supports_autocomplete, true)
- supports_quick_actions = note_supports_quick_actions?(@note)
- if supports_quick_actions
- preview_url = preview_markdown_path(@project, quick_actions_target_type: @note.noteable_type, quick_actions_target_id: @note.noteable_id)
@@ -27,7 +28,8 @@
attr: :note,
classes: 'note-textarea js-note-text',
placeholder: "Write a comment or drag your files here...",
- supports_quick_actions: supports_quick_actions
+ supports_quick_actions: supports_quick_actions,
+ supports_autocomplete: supports_autocomplete
= render 'shared/notes/hints', supports_quick_actions: supports_quick_actions
.error-alert
diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml
index 5902798dfd0..0cca8d875d2 100644
--- a/app/views/shared/notes/_notes_with_form.html.haml
+++ b/app/views/shared/notes/_notes_with_form.html.haml
@@ -12,7 +12,7 @@
%a.author_link{ href: user_path(current_user) }
= image_tag avatar_icon(current_user), alt: current_user.to_reference, class: 'avatar s40'
.timeline-content.timeline-content-form
- = render "shared/notes/form", view: diff_view
+ = render "shared/notes/form", view: diff_view, supports_autocomplete: autocomplete
- elsif !current_user
.disabled-comment.text-center.prepend-top-default
Please