diff options
author | Yukai Huang | 2017-03-28 12:15:56 +0800 |
---|---|---|
committer | Yukai Huang | 2017-03-28 12:15:56 +0800 |
commit | af5ef52f4b3f77326a97cf733f6bdb680d14f927 (patch) | |
tree | 924445b70cce8b1838dec511120bb6e0dea22b2c /public | |
parent | 579dda951517ea688784f57a15e4152c559bc4ad (diff) |
Add cm instance to cursorActivity argument
Diffstat (limited to '')
-rw-r--r-- | public/js/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/public/js/index.js b/public/js/index.js index 5b3d4770..82f647df 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1845,7 +1845,7 @@ socket.on('disconnect', function (data) { socket.on('reconnect', function (data) { // sync back any change in offline emitUserStatus(true) - cursorActivity() + cursorActivity(editor) socket.emit('online users') }) socket.on('connect', function (data) { @@ -2702,7 +2702,7 @@ editorInstance.on('focus', function (editor) { const cursorActivity = _.debounce(cursorActivityInner, cursorActivityDebounce) -function cursorActivityInner () { +function cursorActivityInner (editor) { if (editorHasFocus() && !Visibility.hidden()) { for (var i = 0; i < window.onlineUsers.length; i++) { if (window.onlineUsers[i].id === window.personalInfo.id) { |