Skip to content
Snippets Groups Projects
Commit c15078e0 authored by Clement Ho's avatar Clement Ho Committed by Clement Ho
Browse files

Merge branch '33529-fix-autocomplete-atwho-not-showing-on-note-edit-form' into 'master'

Fix autocomplete not working on note edit form

Closes #33529

See merge request !12106
parent d427b946
No related branches found
No related tags found
2 merge requests!12260Prepare 9.3 RC4,!12243Resolve "Missing translations for the project & repository pages" conflicts
Loading
Loading
@@ -1060,7 +1060,7 @@ const normalizeNewlines = function(str) {
var targetId = $originalContentEl.data('target-id');
var targetType = $originalContentEl.data('target-type');
 
new gl.GLForm($editForm.find('form'));
new gl.GLForm($editForm.find('form'), this.enableGFM);
 
$editForm.find('form')
.attr('action', postUrl)
Loading
Loading
Loading
Loading
@@ -378,6 +378,23 @@ import '~/notes';
});
});
 
describe('putEditFormInPlace', () => {
it('should call gl.GLForm with GFM parameter passed through', () => {
spyOn(gl, 'GLForm');
const $el = jasmine.createSpyObj('$form', ['find', 'closest']);
$el.find.and.returnValue($('<div>'));
$el.closest.and.returnValue($('<div>'));
Notes.prototype.putEditFormInPlace.call({
getEditFormSelector: () => '',
enableGFM: true
}, $el);
expect(gl.GLForm).toHaveBeenCalledWith(jasmine.any(Object), true);
});
});
describe('postComment & updateComment', () => {
const sampleComment = 'foo';
const updatedComment = 'bar';
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment