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
Léo-Paul Géneau
gitlab-ce
Commits
45deb925
Commit
45deb925
authored
Jul 05, 2018
by
Constance Okoghenun
Committed by
Phil Hughes
Jul 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "When editing a comment in an issue, the preview mode is toggled in the main textarea"
parent
fe695ebd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
app/assets/javascripts/vue_shared/components/markdown/header.vue
...ets/javascripts/vue_shared/components/markdown/header.vue
+2
-2
changelogs/unreleased/44697-when-editing-a-comment-in-an-issue-the-preview-mode-is-toggled-in-the-main-textarea.yml
...ssue-the-preview-mode-is-toggled-in-the-main-textarea.yml
+6
-0
spec/features/projects/issues/user_comments_on_issue_spec.rb
spec/features/projects/issues/user_comments_on_issue_spec.rb
+8
-0
spec/javascripts/vue_shared/components/markdown/header_spec.js
...javascripts/vue_shared/components/markdown/header_spec.js
+1
-1
No files found.
app/assets/javascripts/vue_shared/components/markdown/header.vue
View file @
45deb925
...
@@ -29,8 +29,8 @@
...
@@ -29,8 +29,8 @@
methods
:
{
methods
:
{
isValid
(
form
)
{
isValid
(
form
)
{
return
!
form
||
return
!
form
||
form
.
find
(
'
.js-vue-markdown-field
'
).
length
||
form
.
find
(
'
.js-vue-markdown-field
'
).
length
&&
$
(
this
.
$el
).
closest
(
'
form
'
)
===
form
[
0
];
$
(
this
.
$el
).
closest
(
'
form
'
)
[
0
]
===
form
[
0
];
},
},
previewMarkdownTab
(
event
,
form
)
{
previewMarkdownTab
(
event
,
form
)
{
...
...
changelogs/unreleased/44697-when-editing-a-comment-in-an-issue-the-preview-mode-is-toggled-in-the-main-textarea.yml
0 → 100644
View file @
45deb925
---
title
:
Fixed bug when editing a comment in an issue,the preview mode is toggled in
the main textarea
merge_request
:
20112
author
:
Constance Okoghenun
type
:
fixed
spec/features/projects/issues/user_comments_on_issue_spec.rb
View file @
45deb925
...
@@ -63,6 +63,14 @@ describe "User comments on issue", :js do
...
@@ -63,6 +63,14 @@ describe "User comments on issue", :js do
page
.
within
(
".current-note-edit-form"
)
do
page
.
within
(
".current-note-edit-form"
)
do
fill_in
(
"note[note]"
,
with:
comment
)
fill_in
(
"note[note]"
,
with:
comment
)
find
(
'textarea'
).
send_keys
[
:control
,
:shift
,
'p'
]
expect
(
page
).
to
have_selector
(
'.current-note-edit-form .md-preview-holder'
)
expect
(
page
.
find
(
'.current-note-edit-form .md-preview-holder p'
)).
to
have_content
(
comment
)
end
expect
(
page
).
to
have_selector
(
'.new-note .note-textarea'
)
page
.
within
(
".current-note-edit-form"
)
do
click_button
(
"Save comment"
)
click_button
(
"Save comment"
)
end
end
...
...
spec/javascripts/vue_shared/components/markdown/header_spec.js
View file @
45deb925
...
@@ -51,7 +51,7 @@ describe('Markdown field header component', () => {
...
@@ -51,7 +51,7 @@ describe('Markdown field header component', () => {
spyOn
(
vm
,
'
$emit
'
);
spyOn
(
vm
,
'
$emit
'
);
$
(
document
).
triggerHandler
(
'
markdown-preview:show
'
,
[
$
(
document
).
triggerHandler
(
'
markdown-preview:show
'
,
[
$
(
'
<form><
textarea class="markdown-area"></textarea></textarea
></form>
'
),
$
(
'
<form><
div class="js-vue-markdown-field"><textarea class="markdown-area"></textarea></div
></form>
'
),
]);
]);
expect
(
vm
.
$emit
).
not
.
toHaveBeenCalled
();
expect
(
vm
.
$emit
).
not
.
toHaveBeenCalled
();
...
...
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