mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-18 19:24:22 +00: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-model="state.content"
|
||||||
ng-keypress="handleCommentKeyPress($event);"
|
ng-keypress="handleCommentKeyPress($event);"
|
||||||
placeholder="Add your comment here"
|
placeholder="Add your comment here"
|
||||||
|
focus-on="comment:new:open"
|
||||||
)
|
)
|
||||||
.rp-entry-actions
|
.rp-entry-actions
|
||||||
a.rp-entry-button(href, ng-click="cancelNewComment();")
|
a.rp-entry-button(href, ng-click="cancelNewComment();")
|
||||||
|
|
|
@ -17,6 +17,8 @@ define [
|
||||||
scope.startNewComment = () ->
|
scope.startNewComment = () ->
|
||||||
scope.state.isAdding = true
|
scope.state.isAdding = true
|
||||||
scope.onStartNew()
|
scope.onStartNew()
|
||||||
|
setTimeout () ->
|
||||||
|
scope.$broadcast "comment:new:open"
|
||||||
|
|
||||||
scope.cancelNewComment = () ->
|
scope.cancelNewComment = () ->
|
||||||
scope.state.isAdding = false
|
scope.state.isAdding = false
|
||||||
|
|
Loading…
Reference in a new issue