Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
29d8b370
Commit
29d8b370
authored
Jun 29, 2017
by
Tim Zallmann
Committed by
Phil Hughes
Jun 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Issue dropdown persists when adding issue number to issue description"
parent
eb77e638
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
1 deletion
+22
-1
app/assets/javascripts/gfm_auto_complete.js
app/assets/javascripts/gfm_auto_complete.js
+7
-0
app/assets/javascripts/gl_form.js
app/assets/javascripts/gl_form.js
+5
-1
app/assets/javascripts/vue_shared/components/markdown/field.vue
...sets/javascripts/vue_shared/components/markdown/field.vue
+6
-0
changelogs/unreleased/34403-issue-dropdown-persists-when-adding-issue-number-to-issue-description.yml
...ersists-when-adding-issue-number-to-issue-description.yml
+4
-0
No files found.
app/assets/javascripts/gfm_auto_complete.js
View file @
29d8b370
...
@@ -396,6 +396,13 @@ class GfmAutoComplete {
...
@@ -396,6 +396,13 @@ class GfmAutoComplete {
this
.
cachedData
=
{};
this
.
cachedData
=
{};
}
}
destroy
()
{
this
.
input
.
each
((
i
,
input
)
=>
{
const
$input
=
$
(
input
);
$input
.
atwho
(
'
destroy
'
);
});
}
static
isLoading
(
data
)
{
static
isLoading
(
data
)
{
let
dataToInspect
=
data
;
let
dataToInspect
=
data
;
if
(
data
&&
data
.
length
>
0
)
{
if
(
data
&&
data
.
length
>
0
)
{
...
...
app/assets/javascripts/gl_form.js
View file @
29d8b370
...
@@ -21,6 +21,9 @@ function GLForm(form, enableGFM = false) {
...
@@ -21,6 +21,9 @@ function GLForm(form, enableGFM = false) {
GLForm
.
prototype
.
destroy
=
function
()
{
GLForm
.
prototype
.
destroy
=
function
()
{
// Clean form listeners
// Clean form listeners
this
.
clearEventListeners
();
this
.
clearEventListeners
();
if
(
this
.
autoComplete
)
{
this
.
autoComplete
.
destroy
();
}
return
this
.
form
.
data
(
'
gl-form
'
,
null
);
return
this
.
form
.
data
(
'
gl-form
'
,
null
);
};
};
...
@@ -33,7 +36,8 @@ GLForm.prototype.setupForm = function() {
...
@@ -33,7 +36,8 @@ GLForm.prototype.setupForm = function() {
this
.
form
.
addClass
(
'
gfm-form
'
);
this
.
form
.
addClass
(
'
gfm-form
'
);
// remove notify commit author checkbox for non-commit notes
// remove notify commit author checkbox for non-commit notes
gl
.
utils
.
disableButtonIfEmptyField
(
this
.
form
.
find
(
'
.js-note-text
'
),
this
.
form
.
find
(
'
.js-comment-button, .js-note-new-discussion
'
));
gl
.
utils
.
disableButtonIfEmptyField
(
this
.
form
.
find
(
'
.js-note-text
'
),
this
.
form
.
find
(
'
.js-comment-button, .js-note-new-discussion
'
));
new
GfmAutoComplete
(
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
).
setup
(
this
.
form
.
find
(
'
.js-gfm-input
'
),
{
this
.
autoComplete
=
new
GfmAutoComplete
(
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
);
this
.
autoComplete
.
setup
(
this
.
form
.
find
(
'
.js-gfm-input
'
),
{
emojis
:
true
,
emojis
:
true
,
members
:
this
.
enableGFM
,
members
:
this
.
enableGFM
,
issues
:
this
.
enableGFM
,
issues
:
this
.
enableGFM
,
...
...
app/assets/javascripts/vue_shared/components/markdown/field.vue
View file @
29d8b370
...
@@ -64,6 +64,12 @@
...
@@ -64,6 +64,12 @@
*/
*/
return
new
gl
.
GLForm
(
$
(
this
.
$refs
[
'
gl-form
'
]),
true
);
return
new
gl
.
GLForm
(
$
(
this
.
$refs
[
'
gl-form
'
]),
true
);
},
},
beforeDestroy
()
{
const
glForm
=
$
(
this
.
$refs
[
'
gl-form
'
]).
data
(
'
gl-form
'
);
if
(
glForm
)
{
glForm
.
destroy
();
}
},
};
};
</
script
>
</
script
>
...
...
changelogs/unreleased/34403-issue-dropdown-persists-when-adding-issue-number-to-issue-description.yml
0 → 100644
View file @
29d8b370
---
title
:
Closes any open Autocomplete of the markdown editor when the form is closed
merge_request
:
12521
author
:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment