mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #408 from sharelatex/ja-track-changes
Clear selection after creating a comment
This commit is contained in:
commit
c97ded201f
2 changed files with 4 additions and 0 deletions
|
@ -37,6 +37,9 @@ define [
|
|||
@gotoOffset(offset)
|
||||
, 10 # Hack: Must happen after @gotoStoredPosition
|
||||
|
||||
@$scope.$on "#{@$scope.name}:clearSelection", (e) =>
|
||||
@editor.selection.clearSelection()
|
||||
|
||||
storeScrollTopPosition: (session) ->
|
||||
if @doc_id?
|
||||
docPosition = @localStorage("doc.position.#{@doc_id}") || {}
|
||||
|
|
|
@ -306,6 +306,7 @@ define [
|
|||
$http.post("/project/#{$scope.project_id}/thread/#{thread_id}/messages", {content, _csrf: window.csrfToken})
|
||||
.error (error) ->
|
||||
ide.showGenericMessageModal("Error submitting comment", "Sorry, there was a problem submitting your comment")
|
||||
$scope.$broadcast "editor:clearSelection"
|
||||
$timeout () ->
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
event_tracking.sendMB "rp-new-comment", { size: content.length }
|
||||
|
|
Loading…
Reference in a new issue