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
Boxiang Sun
gitlab-ce
Commits
dd047865
Commit
dd047865
authored
Apr 16, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add move cursor to last character for editing comment also.
parent
262ca7b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+9
-4
No files found.
app/assets/javascripts/notes.js.coffee
View file @
dd047865
...
@@ -366,6 +366,11 @@ class @Notes
...
@@ -366,6 +366,11 @@ class @Notes
# Show the attachment delete link
# Show the attachment delete link
note
.
find
(
".js-note-attachment-delete"
).
show
()
note
.
find
(
".js-note-attachment-delete"
).
show
()
done
=
(
$noteText
)
->
# Neat little trick to put the cursor at the end
noteTextVal
=
$noteText
.
val
()
$noteText
.
val
(
''
).
val
(
noteTextVal
);
new
GLForm
form
new
GLForm
form
if
scrollTo
?
and
myLastNote
?
if
scrollTo
?
and
myLastNote
?
# scroll to the bottom
# scroll to the bottom
...
@@ -376,12 +381,12 @@ class @Notes
...
@@ -376,12 +381,12 @@ class @Notes
},
500
,
->
},
500
,
->
$noteText
=
form
.
find
(
".js-note-text"
)
$noteText
=
form
.
find
(
".js-note-text"
)
$noteText
.
focus
()
$noteText
.
focus
()
# Neat little trick to put the cursor at the end
done
(
$noteText
)
noteTextVal
=
$noteText
.
val
()
$noteText
.
val
(
''
).
val
(
noteTextVal
);
);
);
else
else
form
.
find
(
".js-note-text"
).
focus
()
$noteText
=
form
.
find
(
'.js-note-text'
)
$noteText
.
focus
()
done
(
$noteText
)
###
###
Called in response to clicking the edit note link
Called in response to clicking the edit note link
...
...
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