mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-09 00:51:49 +00:00
Track clicks anywhere on the window as activity when the editor is open
This commit is contained in:
parent
a68489a604
commit
839ea496f1
1 changed files with 9 additions and 1 deletions
|
@ -36,7 +36,7 @@ define [
|
|||
url = ace.config._moduleUrl(args...)
|
||||
return url
|
||||
|
||||
App.directive "aceEditor", ($timeout, $compile, $rootScope, event_tracking, localStorage, $cacheFactory, metadata, graphics, preamble, files, $http, $q) ->
|
||||
App.directive "aceEditor", ($timeout, $compile, $rootScope, event_tracking, localStorage, $cacheFactory, metadata, graphics, preamble, files, $http, $q, $window) ->
|
||||
monkeyPatchSearch($rootScope, $compile)
|
||||
|
||||
return {
|
||||
|
@ -376,8 +376,16 @@ define [
|
|||
# deletes and then inserts document content
|
||||
session.setAnnotations scope.annotations
|
||||
|
||||
|
||||
session.on "changeScrollTop", event_tracking.editingSessionHeartbeat
|
||||
|
||||
angular.element($window).on('click',
|
||||
event_tracking.editingSessionHeartbeat)
|
||||
|
||||
scope.$on "$destroy", () ->
|
||||
angular.element($window).off('click',
|
||||
event_tracking.editingSessionHeartbeat)
|
||||
|
||||
if scope.eventsBridge?
|
||||
session.on "changeScrollTop", onScroll
|
||||
|
||||
|
|
Loading…
Reference in a new issue