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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
3e0a76da
Commit
3e0a76da
authored
Aug 10, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Fix async bug of note being updated at the same time
parent
fbf241e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
app/assets/javascripts/notes/components/issue_note_form.vue
app/assets/javascripts/notes/components/issue_note_form.vue
+5
-7
No files found.
app/assets/javascripts/notes/components/issue_note_form.vue
View file @
3e0a76da
...
...
@@ -22,6 +22,7 @@
discussion
:
{
type
:
Object
,
required
:
false
,
default
:
()
=>
({}),
},
isEditing
:
{
type
:
Boolean
,
...
...
@@ -30,7 +31,6 @@
},
data
()
{
return
{
initialNote
:
this
.
noteBody
,
note
:
this
.
noteBody
,
conflictWhileEditing
:
false
,
isSubmitting
:
false
,
...
...
@@ -72,10 +72,7 @@
},
editMyLastNote
()
{
if
(
this
.
note
===
''
)
{
const
lastNoteInDiscussion
=
this
.
getDiscussionLastNote
(
this
.
discussion
,
this
.
currentUserId
,
);
const
lastNoteInDiscussion
=
this
.
getDiscussionLastNote
(
this
.
discussion
);
if
(
lastNoteInDiscussion
)
{
eventHub
.
$emit
(
'
enterEditMode
'
,
{
...
...
@@ -86,7 +83,7 @@
},
cancelHandler
(
shouldConfirm
=
false
)
{
// Sends information about confirm message and if the textarea has changed
this
.
$emit
(
'
cancelFormEdition
'
,
shouldConfirm
,
this
.
initialNote
!==
this
.
note
);
this
.
$emit
(
'
cancelFormEdition
'
,
shouldConfirm
,
this
.
noteBody
!==
this
.
note
);
},
},
mounted
()
{
...
...
@@ -94,7 +91,7 @@
},
watch
:
{
noteBody
()
{
if
(
this
.
note
===
this
.
initialNote
)
{
if
(
this
.
note
===
this
.
noteBody
)
{
this
.
note
=
this
.
noteBody
;
}
else
{
this
.
conflictWhileEditing
=
true
;
...
...
@@ -157,3 +154,4 @@
</form>
</div>
</
template
>
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