Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuperSayu <supersayu@gmail.com>2017-09-17 19:25:00 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2017-12-06 10:42:28 +0300
commit074e9c597e89174f23594102c65cffe4f9bd6e4c (patch)
tree1f83633884c49b67df369129949ec08d7b27556b
parent11fcf12ee0dcbb29d94fe8780516631ceca3fca4 (diff)
Fix autosave timer
The autosave timer was not functioning properly because the timer was being incorrectly stored, resulting in a save file request for every change in the editor to be sent to the server. Signed-off-by: Vincent Van Laak <supersayu@gmail.com>
-rw-r--r--js/editor.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/editor.js b/js/editor.js
index b6177ab..958f9a8 100644
--- a/js/editor.js
+++ b/js/editor.js
@@ -635,8 +635,8 @@ var Files_Texteditor = {
* Configure the autosave timer
*/
setupAutosave: function() {
- clearTimeout(this.saveTimer);
- this.saveTimer = setTimeout(OCA.Files_Texteditor._onSaveTrigger, 3000);
+ clearTimeout(OCA.Files_Texteditor.saveTimer);
+ OCA.Files_Texteditor.saveTimer = setTimeout(OCA.Files_Texteditor._onSaveTrigger, 3000);
},
/**