mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Focus on text area when adding a comment
This commit is contained in:
parent
278bfc1f50
commit
e5c96eb619
2 changed files with 3 additions and 0 deletions
|
@ -273,6 +273,7 @@ script(type='text/ng-template', id='addCommentEntryTemplate')
|
|||
ng-model="state.content"
|
||||
ng-keypress="handleCommentKeyPress($event);"
|
||||
placeholder="Add your comment here"
|
||||
focus-on="comment:new:open"
|
||||
)
|
||||
.rp-entry-actions
|
||||
a.rp-entry-button(href, ng-click="cancelNewComment();")
|
||||
|
|
|
@ -17,6 +17,8 @@ define [
|
|||
scope.startNewComment = () ->
|
||||
scope.state.isAdding = true
|
||||
scope.onStartNew()
|
||||
setTimeout () ->
|
||||
scope.$broadcast "comment:new:open"
|
||||
|
||||
scope.cancelNewComment = () ->
|
||||
scope.state.isAdding = false
|
||||
|
|
Loading…
Reference in a new issue