Commit 391195f3 authored by Fatih Acet's avatar Fatih Acet

Merge branch '39020-fix-js-call-stack-size-exceeded-autocomplete-group-milestone' into 'master'

Fix call stack size exceeded group milestone description autocomplete

Closes #39020

See merge request gitlab-org/gitlab-ce!14972
parents 9a58468b e6b0f442
...@@ -231,12 +231,16 @@ import Diff from './diff'; ...@@ -231,12 +231,16 @@ import Diff from './diff';
case 'projects:milestones:new': case 'projects:milestones:new':
case 'projects:milestones:edit': case 'projects:milestones:edit':
case 'projects:milestones:update': case 'projects:milestones:update':
new ZenMode();
new DueDateSelectors();
new GLForm($('.milestone-form'), true);
break;
case 'groups:milestones:new': case 'groups:milestones:new':
case 'groups:milestones:edit': case 'groups:milestones:edit':
case 'groups:milestones:update': case 'groups:milestones:update':
new ZenMode(); new ZenMode();
new DueDateSelectors(); new DueDateSelectors();
new GLForm($('.milestone-form'), true); new GLForm($('.milestone-form'), false);
break; break;
case 'projects:compare:show': case 'projects:compare:show':
new Diff(); new Diff();
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
= f.label :description, "Description", class: "control-label" = f.label :description, "Description", class: "control-label"
.col-sm-10 .col-sm-10
= render layout: 'projects/md_preview', locals: { url: group_preview_markdown_path } do = render layout: 'projects/md_preview', locals: { url: group_preview_markdown_path } do
= render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: 'Write milestone description...' = render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: 'Write milestone description...', supports_autocomplete: false
.clearfix .clearfix
.error-alert .error-alert
......
...@@ -19,9 +19,9 @@ feature 'Group milestones', :js do ...@@ -19,9 +19,9 @@ feature 'Group milestones', :js do
end end
it 'renders description preview' do it 'renders description preview' do
form = find('.gfm-form') description = find('.note-textarea')
form.fill_in(:milestone_description, with: '') description.native.send_keys('')
click_link('Preview') click_link('Preview')
...@@ -31,7 +31,7 @@ feature 'Group milestones', :js do ...@@ -31,7 +31,7 @@ feature 'Group milestones', :js do
click_link('Write') click_link('Write')
form.fill_in(:milestone_description, with: ':+1: Nice') description.native.send_keys(':+1: Nice')
click_link('Preview') click_link('Preview')
...@@ -51,6 +51,13 @@ feature 'Group milestones', :js do ...@@ -51,6 +51,13 @@ feature 'Group milestones', :js do
expect(find('.start_date')).to have_content(Date.today.at_beginning_of_month.strftime('%b %-d, %Y')) expect(find('.start_date')).to have_content(Date.today.at_beginning_of_month.strftime('%b %-d, %Y'))
end end
it 'description input does not support autocomplete' do
description = find('.note-textarea')
description.native.send_keys('!')
expect(page).not_to have_selector('.atwho-view')
end
end end
context 'milestones list' do context 'milestones list' 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