mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 23:29:00 +02:00
Track clicks anywhere on the window as activity when the editor is open
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user